.NET generics terminology is a bit ambiguous. Even worse – it seems to be used ambiguously and differently in different sources. What basically is not clear is relationships between these 4 terms (in relation to “Type”):
- open
- closed
- unbound
- constructed
I understand that List<T> is open and List<int> is closed. But what really is “constructed” and “unbound” in relation to open/closed types?
From the language specification:
Here’s an example I thought of:
And here’s an attempt to tie that in with the reflection API, using the relevant properties:
IsGenericType,IsGenericTypeDefinitionandContainsGenericParameters(These tests are not 100% predictive of each "kind" as per the language spec).