.NET generics

E827345

.NET generics are a type system feature in the .NET framework that enables type-safe, reusable, and efficient data structures and methods by allowing code to be written with placeholder types.

All labels observed (1)

Label Occurrences
.NET generics canonical 1

How this entity was disambiguated

Statements (49)

Predicate Object
instanceOf .NET feature
type system feature
allows compile-time type checking
strongly typed collections
documentedIn Microsoft .NET documentation
enables generic classes
generic delegates
generic interfaces
generic methods
parameterized types
exampleTypeParameterNotation T
TKey
TValue
hasCharacteristic reified generics at runtime
type erasure not used
implementedBy CLR
improvesOver non-generic collections
introducedIn .NET Framework 2.0
linked to: .NET Framework
partOf .NET Framework
.NET runtime
.NET type system
linked to: Common Type System
provides code reuse
performance benefits
type safety
reduces boxing and unboxing operations
runtime casting errors
relatedTo C++ templates
Java generics
supportedIn .NET 5+
.NET Core
C#
F#
VB.NET
linked to: Visual Basic .NET
supports base class constraints
constructor constraints (new())
generic constraints
interface constraints
reference type constraints (class)
type parameters
value type constraints (struct)
syntaxExampleLanguage C#
usedBy Dictionary<TKey,TValue>
ICollection<T>
IEnumerable<T>
IList<T>
List<T>
Queue<T>
Stack<T>
System.Collections.Generic namespace

How these facts were elicited

Referenced by (1)

Full triples — surface form annotated when it differs from this entity's canonical label.

Don Syme contributedTo .NET generics