Congratulations to all monthly winners of May 2013 !!! They have won INR 2900 cash and INR 27497 worth prize.
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 19499 |  Welcome, Guest!   Register  Login
 Home > Interview Questions > C# Interview Questions > What are Generics? ... ...

What are Generics?

Interview question and answer by: Poster | Posted on: 9/12/2010 | Category: C# Interview questions | Views: 2888 | | Points: 40
Ads
Ads


Answer:

Generics means parametrized types. A class, structure, interface, delegates that operates on a parametrized type is called generics.

The ability to create type-safe code in which type-mismatch errors are caught at compile time rather than run time is the key advantage of the Generics. So using generics on the class, interface, methods or delegates avoids run time errors as it is caught at the compile time itself.

In order to use Generics, we need to work with System.Collections.Generic namespace.

IList<>, IEnumerable, IEnuerator<>, IComparer<>, ICollection<> and IDictionary are some of the frequently used generics objects.

Asked In: Many Interviews | Alert Moderator 
Found interesting? Add this to:


>> Write Response - Respond to this post and get points

Even more ... | Submit Interview Questions and win prizes!

More Interview Questions from Poster

Even more ... | Submit Interview Questions and win prizes!


About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 6/19/2013 8:58:08 PM