I want to dynamically generate a method with 'new' keyword in its method signature using codedom. Want to generate something like this
private new void MyMethod()
{
}
When you call TypeBuilder.DefineMethod
, just include MethodAttributes.NewSlot
:
Indicates that the method always gets a new slot in the vtable.
See more on this question at Stackoverflow