What are the advantages you get by using generics?

 Posted by Kmandapalli on 1/20/2014 | Category: C# Interview questions | Views: 1882 | Points: 40
Answer:

1.Lets you to re-use the code and the effort that you put into implementing it.
2.The types and internal data can change, regardless of whether you are using value type or reference type.
3.Performance is greatly improved as the generic code does not force boxing and unboxing of value types, or downcasting of reference types.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response