Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The 'construct' 'identifier' is not a generic method. If you intended an expression list, use parentheses around the < expression.
The construct named was not a type or a method, the only constructs that can take generic arguments. Remove the type arguments in angle brackets. If a generic is needed, declare your generic construct as a generic type or method.
The following sample generates CS0307:
// CS0307.cs
class C
{
public int P { get { return 1; } }
public static void Main()
{
C c = new C();
int p = c.P<int>(); // CS0307 – C.P is a property
// Try this instead
// int p = c.P;
}
}
.NET feedback
.NET is an open source project. Select a link to provide feedback: