public void Form2() { CodeCompileUnit compileUnit = ParseHelper.Parse(TestEnum.Form2); ParseHelper.CheckCompileUnit(compileUnit, 1); CodeNamespace codeNamespace = compileUnit.Namespaces[0]; ParseHelper.CheckNamespace(codeNamespace, "WindowsApplication", 1); CodeTypeDeclaration type = codeNamespace.Types[0]; ParseHelper.CheckClass(type, "Form2", MemberAttributes.Public, 3, "System.Windows.Forms.Form"); ParseHelper.CheckField(type.Members[0], "components", "System.ComponentModel.IContainer", MemberAttributes.Private); ParseHelper.CheckCtor(type.Members[1], MemberAttributes.Public, 0); ParseHelper.CheckMethod(type.Members[2], "InitializeComponent", "System.Void", MemberAttributes.Private, 0); // prints code ParseHelper.Provider.GenerateCodeFromCompileUnit(compileUnit, Console.Out, ParseHelper.DefaultOptions); }