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.
Using the generic type 'generic type' requires 'number' type arguments
This error occurs when the expected number of type arguments was not found. To resolve C0305, use the required number of type arguments.
The following sample generates CS0305.
// CS0305.cs
public class MyList<T> {}
public class MyClass<T> {}
class MyClass
{
public static void Main()
{
MyList<MyClass, MyClass> list1 = new MyList<MyClass>(); // CS0305
MyList<MyClass> list2 = new MyList<MyClass>(); // OK
}
}
.NET feedback
.NET is an open source project. Select a link to provide feedback: