9 // Default constructor:
16 public Kid(string name
, int age
)
23 public void PrintKid()
25 Console
.WriteLine("{0}, {1} years old.", name
, age
);
29 public class MainClass
31 public static void Main()
34 // Objects must be created using the new operator:
35 Kid kid1
= new Kid("Craig", 11);
36 Kid kid2
= new Kid("Sally", 10);
38 // Create an object using the default constructor:
42 Console
.Write("Kid #1: ");
44 Console
.Write("Kid #2: ");
46 Console
.Write("Kid #3: ");