Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the term for empty generic parameters <,> in C#? [duplicate]

Tags:

c#

generics

Possible Duplicate:
C# Language: generics, open/closed, bound/unbound, constructed

While doing some stuff with reflection in C#, I've noticed that some types have the type definition e.g.

Foo<,>

What is the official term for this notation?

like image 310
Bringer128 Avatar asked Nov 28 '12 03:11

Bringer128


1 Answers

Type names which are missing generic parameters such as List<> are referred to as unbound generic types. This question has a good summary of unbound generic types as well as some related terminology.

Depending on what context you are describing these types, some other terminology may be used. The C# specification uses the term "unbound generic type" to refer to something like T<>. The .Net framework seems to prefer the terms "generic type definition" (as dasblinkenlight pointed out, see also Type.GetGenericTypeDefinition()) or "open generic type" (see this article).

like image 57
Wesley Wiser Avatar answered Nov 10 '22 00:11

Wesley Wiser