【发布时间】:2013-04-03 00:52:30
【问题描述】:
从另一个扩展方法调用扩展方法时,我的解决方案构建正常,但在已发布的站点(或虚拟 asp.net 服务器)中,我收到编译错误“歧义调用”。
public static string ExtensionMethodA(this ObjectToExtend myObj){//code here}
public static string ExtensionMethodB(this ObjectToExtend myObj){
string a = myObj.ExtensionMethodA(); // this line causes the error.
return a;
}
【问题讨论】: