Пример #1
0
 public DemoClass2(int intProperty, string stringProperty1,
                   MyLittleObject objectProperty,
                   int[] intArrayProperty, string[] stringArrayProperty,
                   List <MyLittleObject> objectListProperty, List <string> stringListProperty,
                   List <int> intListProperty)
 {
     _int          = intProperty;
     _string1      = stringProperty1;
     _string2      = null;
     _parameter    = objectProperty;
     _parameter2   = null;
     _intArray     = intArrayProperty;
     _intArray2    = null;
     _intArray3    = new int[0];
     _stringArray  = stringArrayProperty;
     _stringArray2 = null;
     _stringArray3 = new string[0];
     _objectList1  = objectListProperty;
     _objectList2  = null;
     _objectList3  = new List <MyLittleObject>();
     _stringList1  = stringListProperty;
     _stringList2  = null;
     _stringList3  = new List <string>();
     _intList1     = intListProperty;
     _intList2     = null;
     _intList3     = new List <int>();
 }
Пример #2
0
 public static void DisplayAnObject()
 {
     try
     {
         MyLittleObject obj = new MyLittleObject(1, "String property");
         ConsoleDisplayHelper.ShowObject(obj, 0, "{0} to display:", obj.GetType().Name);
     }
     catch (Exception xcp)
     {
         ConsoleDisplayHelper.ShowException(1, xcp);
     }
 }