What are Generics? Where do we use them.

Answer Posted / rakesh kumar kunchala

Generics are used to have Typed Arrays.

Ex: if we have define that an array is confined to products.
if we push objects of product into array it accepts.
if we push employee objects into this array it will show
error . since the type of the array is product.

Is This Answer Correct ?    9 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the .net framework overview?

655


How viewstate is being formed and how it is stored on client in .net?

632


What is the difference between a namespace and assembly name in .net?

609


I'm having some trouble with cas. How can I troubleshoot the problem?

666


What is il and c#?

665






Is .net core the future?

673


What tools can I use to develop .net applications?

648


What is reflection in microsoft .net context?

650


Explain cas (code access security)?

686


What is the use com component in .net?

676


How to create multiple inheritance in c#, with example?

650


What is Event Bubbling in .NET?

760


What is the use of common language runtime?

689


What is lazy initialization?

680


How to view a .NET assembly?

682