Friday, February 25, 2011

.NET interview question on generics :- How does performance increase by using generic collection ?

.NET interview question on generics :- How does performance increase by using generic collection ?


Answer:
When we use normally .NET collection objects there is lot of boxing and unboxing. When we create a collection which is a generic collection its strongly typed. As its strongly typed boxing and unboxing gets eliminated and thus increasing performance.
See my 32 important C# interview questions

No comments: