O'Reilly logo
  • Ismael Lanchas thinks this is interesting:

Generic Constraints

By default, a type parameter can be substituted with any type whatsoever. Constraints can be applied to a type parameter to require more specific type arguments. These are the possible constraints:

where T : base-class   // Base-class constraint
where T : interface    // Interface constraint
where T : class        // Reference-type constraint
where T : struct       // Value-type constraint (excludes Nullable types)
where T : new()        // Parameterless constructor constraint
where U...


Cover of C# 6.0 in a Nutshell, 6th Edition


El tipo variable en genéricos se puede limitar en algunos sentidos.