Esempio n. 1
0
 public MyObject()
 {
     Console.WriteLine("MyObject constructor starting");
     Console.WriteLine();
     Console.WriteLine();
     _dynamicObj = new MyOtherObject();
     Console.WriteLine("MyObject constructor ending");
 }
Esempio n. 2
0
 // Constructor (a real chatterbox)
 public MyObject()
 {
     Console.WriteLine("MyObject constructor starting");
     Console.WriteLine("(Static data member constructed before " +
                       "this constructor)");
     Console.WriteLine("Now create nonstatic data member dynamically:");
     _dynamicObj = new MyOtherObject();
     Console.WriteLine("MyObject constructor ending");
 }
Esempio n. 3
0
 // Constructor (a real chatterbox)
 public MyObject()
 {
     Console.WriteLine("MyObject constructor starting");
     Console.WriteLine("(Static data member constructed before " +
                       "this constructor)");
     Console.WriteLine("Now create nonstatic data member dynamically:");
     _dynamicObj = new MyOtherObject();
     Console.WriteLine("MyObject constructor ending");
 }