Edit

Share via


Compiler Error CS0306

The type 'type' may not be used as a type argument

The type used as a type parameter is not allowed. This could be because the type is a pointer type.

The following example generates CS0306:

// CS0306.cs  
class C<T>  
{  
}  
  
class M  
{  
    // CS0306 – int* not allowed as a type parameter  
     C<int*> f;  
}