public void Run() { Dictionary <string, string> settings = new Dictionary <string, string>(); settings.Add("UseAssignmentStatements", "true"); Run("TEST_5_PROPERTY_ASSIGNEMENT_SETTING_NESTED_CLASSES", settings); TestClass testclass = new TestClass(); testclass.TestGuid = Guid.NewGuid(); testclass.TestBoolean = true; testclass.TestChildClass = new ChildClass(); testclass.TestChildClass.TestInt = 1; testclass.TestChildClass.TestChildChildClass = new ChildChildClass(); testclass.TestChildClass.TestChildChildClass.TestBool = true; ChildClass childclass = new ChildClass(); childclass.TestInt = 1; childclass.TestChildChildClass = new ChildChildClass(); childclass.TestChildChildClass.TestBool = true; ChildChildClass childchildclass = new ChildChildClass(); childchildclass.TestBool = true; }
static void Main(string[] args) { var obj = new ChildChildClass(); var ChildChildType = obj.GetType(); var p = new Program(); // here we get the ChildClass properties var t = p.getBaseType(ChildChildType, 1); Console.WriteLine(t.Name); p.getproperties(t); // here we get the BaseClass properties t = p.getBaseType(ChildChildType, 2); Console.WriteLine(t.Name); p.getproperties(t); // here we get the Object properties t = p.getBaseType(ChildChildType, 3); Console.WriteLine(t.Name); p.getproperties(t); Console.Read(); }