K
kishore
hi
I am trying to dynamically generate a static constructor using
CodeDOM. However even though i set the MemberAttributes to static, it
generates a constructor with no attributes. not sure how to do. Any
help please.
Here is my code
CodeConstructor staticConstructor = new
CodeConstructor();
staticConstructor.Attributes |=
MemberAttributes.Static;
newClass.Members.Add(staticConstructor);
This is generating a constructor as below:
MyClass()
{
}
Its not appending the "static" keyword with the constructor. What am i
missing?
Thanks
I am trying to dynamically generate a static constructor using
CodeDOM. However even though i set the MemberAttributes to static, it
generates a constructor with no attributes. not sure how to do. Any
help please.
Here is my code
CodeConstructor staticConstructor = new
CodeConstructor();
staticConstructor.Attributes |=
MemberAttributes.Static;
newClass.Members.Add(staticConstructor);
This is generating a constructor as below:
MyClass()
{
}
Its not appending the "static" keyword with the constructor. What am i
missing?
Thanks