C# Generics and Constraints

preview_player
Показать описание
What is Generics?
---------------------------------------------------------------------
Generic is a class which allows the user to define classes and methods with the placeholder. Generics were added to version 2.0
Best approach for Code development with independent of Data types.
We can define generic classes, interfaces, methods, static methods, properties, events, delegates,abstract classes, fields, and operators.
Generics classes are available in System.Collections.Generic namespace

Advantage:
Code reuse, type safety, and performance
Create generic class with constraints

What is boxing and Unboxing?
------------------------------------------
Process of converting val type to Ref type is called Boxing and viceversa is called Unboxing

Microsoft ref:
Рекомендации по теме
Комментарии
Автор

Great Explanation Akhil Sir this really help me to understand both ..

Keep it up

nagendraupwanshi