From the C# Language specification:
A type that includes at least one type argument is called a constructed type. A constructed type can be used in most places in the language in which a type name can appear
What I understand from this sentence is that including a type argument (even in the case in which more are required) is sufficient for a generic type to be called a 'constructed type' and being so, to be used in a type declaration.
Can you provide an example of a generic type with multiple type parameters that is constructed by specifying only one argument and is used where a type name can appear?
Edit 1
Probably the definition should be read as:
A type that includes all the required type arguments is called a constructed type.
That means: a generic definition comes with a certain number of type parameters. A constructed type is created by passing all the required parameters, either as open types or closded types.
Moreover, we can also have sort of 'overload' of generic types, where
Queue
is another type from Queue<>
(and from Queue<,>
, Queue<,,>
etc. etc.).
namespace Widgets
{
class Queue {...}
class Queue<TElement> {...}
}
Each type having its set of parameters; to identify a type, you have to use the exact number of parameters required, not "at least one". So maybe "at least one" means then when you see a declaration with "at least one" type arguments you can tell that that is a constructed generic.