What are Generics?

Answer Posted / rt

Generics was a new addition in .NET 2.0
With generics we can create reusable classes. It promotes code reusability.
With generics we create classes with placeholders(<T>), and while creating object of that class we declare a value for that placeholder(int,double,etc) and from then on that object is bind to that type.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I create a multilanguage, single-file assembly?

492


Is c sharp free?

536


Define acid rule of thumb for transactions in c#.

479


What is the example of predicate?

498


What is primitive types in c#?

461






What is xaml file in c#?

530


What is default c#?

498


Can abstract class have constructor c#?

465


What is called method in c#?

512


What floating point types is supported in C#?

589


Is cli same as the clr?

513


Is c# a technology?

488


List down the reason behind the usage of c# language.

644


What are instance fields in c#?

535


What is the difference between list and dictionary in c#?

454