C# Language Type Parameters (Classes)


Example

Declaration:

class MyGenericClass<T1, T2, T3, ...>
{
    // Do something with the type parameters.
}

Initialisation:

var x = new MyGenericClass<int, char, bool>();

Usage (as the type of a parameter):

void AnotherMethod(MyGenericClass<float, byte, char> arg) { ... }