What are the advantages of Generics

 Posted by deccansoft on 9/27/2010 | Category: C# Interview questions | Views: 1975

1. Generics solve the problem of type safety

2. Code Reusability: if we write a Generic Class or method once we can use that through out our program. hence it is code reuse

3. Performance: By using Generics performance increases ,this is because we are not using the concept of Boxing

4 Generic methods can often be called without employing any special syntax by using a feature called type inference

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response