Ejemplo n.º 1
0
 public MyObject()
 {
     Console.WriteLine("MyObject constructor starting");
     Console.WriteLine();
     Console.WriteLine();
     _dynamicObj = new MyOtherObject();
     Console.WriteLine("MyObject constructor ending");
 }
Ejemplo 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");
 }
Ejemplo 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");
 }