It's hard to explain in the title but I have a form I created in Code DOM using
Than I have theCode:public class Form1 : Form { ... }
I also need. But I tried making that a method of the class of the form and it complained about having the same name as the class.Code:public Form1() { InitializeComponent(); }
This is my code dom main class:
And here is the method I am trying to add to that class:Code:myclass = new CodeTypeDeclaration(); myclass.Name = "Form1 : Form"; myclass.IsClass = true; myclass.Attributes = MemberAttributes.Public; mynamespace.Types.Add(myclass);
Did I do somthing wrong in the class or what?Code:CodeMemberMethod Form3 = new CodeMemberMethod(); Form3.Name = "Form1"; Form3.Attributes = MemberAttributes.Public; myclass.Members.Add(Form3);



LinkBack URL
About LinkBacks


