In C# what does where T : class mean?
where T : class
Ie.
public IList<T> DoThis<T>() where T : class
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.
1.4m articles
1.4m replys
5 comments
57.0k users