What are Generics? Where do we use them.

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is .net a programming language?

627


What is garbage collection and how it works. Provide a code example of how you can enforce garbage collection in .net?

606


What is connection pooling and how do you make your application use it?

648


How can you instantiate a tuple?

653


Explain about the features and elements present in Visual studio.NET IDE?

715






Describe the Managed Execution Process?

2115


Is .net a language?

660


What do you mean by web service?

746


What is garbage collection? Explain the difference between garbage collections in .net 4.0 and earlier versions?

778


Is .net core managed code?

615


What are the types of assemblies in .net?

657


Explain what is the reason of occurring overflow-underflow arithmetic exception error, it shows error message when we run our program by adding control?

598


What is the procedure to add assemly to gac to make it shared one?

602


Explain the difference between task and thread in .net?

591


Explain the difference between garbage collections in .net 4.0 and earlier versions?

628