.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.

Try in SPARQL Jump to: Statements Referenced by

Statements (49)

Predicate Object
instanceOf .NET feature
type system feature
allows compile-time type checking
strongly typed collections
documentedIn Microsoft .NET documentation NERFINISHED
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 NERFINISHED
improvesOver non-generic collections
introducedIn .NET Framework 2.0 NERFINISHED
partOf .NET Framework NERFINISHED
.NET runtime NERFINISHED
.NET type system NERFINISHED
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 NERFINISHED
C# NERFINISHED
F# NERFINISHED
VB.NET NERFINISHED
supports base class constraints
constructor constraints (new())
generic constraints
interface constraints
reference type constraints (class)
type parameters
value type constraints (struct)
syntaxExampleLanguage C# NERFINISHED
usedBy Dictionary<TKey,TValue>
ICollection<T>
IEnumerable<T> NERFINISHED
IList<T>
List<T>
Queue<T>
Stack<T> NERFINISHED
System.Collections.Generic namespace NERFINISHED

Referenced by (1)

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

Don Syme contributedTo .NET generics