A simple test case:
using System; public class Test<T> { public enum TestEnum { A, B } public Test (TestEnum a = TestEnum.A) { DoSomething (); } protected void DoSomething() { } }
The compiler (this is using Mono in a Unity3D project, target .NET4.0) gives an error when called from Test() to DoSomething() . If I remove the default option on TestEnum a , it will be just fine. MonoDevelop wants to call the default parameter TestEnum<>.A , but it does not compile, and does not matter TestEnum<T>.A (obviously, I would not expect them to work, but using MonoDevelop autocomplete, what I get) .
EDIT: specific error: the name DoSomething doesn't exists in the current context
user1604356
source share