I have come across this several times over the past week, and am curious to know the reason - I had Google, but I could not find anything directly relevant.
I have a class with a dynamic method, and I can add a static method with the same interface:
public class MyClass
{
public int MyMethod()
{
}
public static int MyMethod()
{
}
}
This is normal, but if I try to call a static method from a dynamic method, replacing # 1 with return MyClass.MyMethod(), I get the error message "The call is ambiguous between the following methods or properties: MyClass.MyMethod () and MyClass.MyMethod ().
If the static method is deleted, the error changes to "An object reference is required ..", which makes sense.
, ? , , .
?
EDIT: , , VS, .
, " , , "