What are Generics? Where do we use them.

Answers were Sorted based on User's Feedback



What are Generics? Where do we use them...

Answer / ritz

Generics was introduced in Framework 2.0
With generics we can have typed classes. While defining
class we simply give placeholders and when we create
objects of that class we declare the placeholder to be of
some type(like int, double, string, etc.) and from that
point on our object gets bind to that type only.

Is This Answer Correct ?    8 Yes 0 No

What are Generics? Where do we use them...

Answer / 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

More Dot Net General Interview Questions

What is an EXE?

1 Answers  


Explain the difference between .net 2000 and .net 2005(features)? Which one is better?

0 Answers  


Explain what does managed mean in the .net context?

0 Answers  


How can I find out what the garbage collector is doing?

0 Answers  


What is portable executable (PE)?

2 Answers  






Which dll translate xml to sql in internet information server (iis)?

0 Answers  


Which among the following two is best and why? Abstract Class and Interface. What is the major difference in between those two except the discrete methods and methods with function definition.

4 Answers   247Customer,


Define satelite assembly?

0 Answers  


Difference between machine.config and web.config?

0 Answers  


What is the difference between a Hash Table and a Dictionary?

1 Answers  


Explain about managed heap?

0 Answers  


What is lambda expressions in c#?

0 Answers  


Categories