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

How many namespaces are in .net version 1.1?

0 Answers  


What is new in .net core?

0 Answers  


What are situations when you register .NET assembly in GAC ?

0 Answers   UGC Corporation,


What is the use of activex control in .net?

0 Answers  


How to manage pagination in a page using .net?

0 Answers  






Different levels of priority provided by .net.

0 Answers  


How can you instantiate a tuple?

0 Answers  


what is the use of stored procedure which has only one select statement over simple select statment query ? Why to write a stored procedure then ?

3 Answers  


What?s a Windows process?

1 Answers  


What is boxing?

3 Answers  


What is your observations between vb.net and vc#.net?

0 Answers  


What is the best way to crack the certification?

0 Answers  


Categories