C# 如何使用';新';使用codedom的方法签名中的关键字
我想使用codedom在方法签名中动态生成一个带有“new”关键字的方法。想要生成这样的东西吗C# 如何使用';新';使用codedom的方法签名中的关键字,c#,.net,codedom,C#,.net,Codedom,我想使用codedom在方法签名中动态生成一个带有“new”关键字的方法。想要生成这样的东西吗 private new void MyMethod() { } 比如: CodeMemberMethod myMethodMethod = new CodeMemberMethod(); myMethodMethod.Attributes = MemberAttributes.Private | MemberAttributes.New; myMethodMethod.Name = "MyMet
private new void MyMethod()
{
}
比如:
CodeMemberMethod myMethodMethod = new CodeMemberMethod();
myMethodMethod.Attributes = MemberAttributes.Private | MemberAttributes.New;
myMethodMethod.Name = "MyMethod";
它是一个MemberAttributes
:MemberAttributes。新的调用时,只需包括:
指示该方法始终在vtable中获取新插槽
谢谢你,萨纳托斯。这就是我想要的。