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
Explain tempdata in asp.net mvc?
How does �side by side� work for the .net framework 3.0?
what do you mean by table-per-type?
mention in what all scenarios entity framework can be applicable?
What are the new enhancements done in default project template of asp.net mvc 4?
Why should we go for entity framework?
What is Layout in ASP.Net MVC?
what is .edmx file and what it contains?
Explain what is routing?
what is code first approach?
What is Dependency Injection in ASP.Net MVC
what is model first approach?
What is the greatest advantage of using asp.net mvc over asp.net webforms?
what do you mean by navigation property?
Possible ways to prevent xss attacks on mvc application?