Generic Methods in C#

preview_player
Показать описание
Generics in C# programming

• Generic means the general form, not specific. In C#, generic means not specific to a particular data type.
• Generics introduced in C# 2.0
• Generics allow you to write a class or method that can work with any data type.
• C# allows you to define generic classes, interfaces, abstract classes, fields, methods, static methods, properties, events, delegates, and operators using the type parameter and without the specific data type. A type parameter is a placeholder for a particular type specified when creating an instance of the generic type.
• You may get the information on the types used in generic data types in run-time.
• A generic type is declared by specifying a type parameter in an angle brackets after a type name, e.g., TypeNameT where T is a type parameter.
Рекомендации по теме