what are generics? Without generics what are the
disadvantages in 1.1?
Answer Posted / purushottam.ambati@gmail.
Generics is a concept introduced in .NET 2.0 and these are
just like templates in C++. Using generics we can create
classes,methods,events, delegates which work with any type
(like int,string,myclass etc). In .NET 2.0,
System.Collections.Generic namesapce was introduced and it
contains classes/interfaces related to generics. Advantages
are Performance, Code Reuse, Type Safety.
we can create generic classes (which work with any type)
in .NET 1.1 by using System.Object class. But, it requires
type casting, boxing and unboxing operations internally.
these operations are very expensive. so performace of
application will degrade.
| Is This Answer Correct ? | 18 Yes | 1 No |
Post New Answer View All Answers
What is MVVM design pattern?
Is razor a server side?
How does �side by side� work for the .net framework 3.0?
explain what does .edmx file contains?
How we can add the CSS in ASP.Net MVC?
what is entity sql?
How to bind table colum with gridview column?
Does Tempdata hold the data for other request in ASP.Net MVC?
Is .net core faster than .net framework?
What are Code Blocks in Views?
Explain the role of assembly in the .net framework.
What is attribute routing in mvc?
what is use of entity container?
Why we need a separate mobile project template, while we can render our web application in mobile ?
mention what is the key advantage of using entity framework or ef?