putting the the Form1() into codedom
It's hard to explain in the title but I have a form I created in Code DOM using
Than I have the
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.
This is my code dom main class:
And here is the method I am trying to add to that class:
myclass = new CodeTypeDeclaration();
myclass.Name = "Form1 : Form";
myclass.IsClass = true;
myclass.Attributes = MemberAttributes.Public;
Did I do somthing wrong in the class or what?
CodeMemberMethod Form3 = new CodeMemberMethod();
Form3.Name = "Form1";
Form3.Attributes = MemberAttributes.Public;