In c# what does 'where T : class' mean?

c#, syntax

Solution

Simply put this is constraining the generic parameter to a class (or more specifically a reference type which could be a class, interface, delegate, or array type).

See this MSDN article for further details.

Problem

In C# what does `where T : class` mean? Ie. ``` public IList<T> DoThis<T>() where T : class ```

Original source