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 the use of viewmodel in mvc?
Mention the core components of .net framework?
What is mapping in entity framework? : Entity framework
What is the meaning of unobtrusive javascript? Explain us by any practical example.
What is the need of Action Filters in ASP.Net MVC
How to Redirect Tracing to a File
What “beforFilter()”,“beforeRender” and “afterFilter” functions do in Controller?
what is use of entitydatasource control?
What is NonActionAttribute ?
Mention what is the difference between “ActionResult” and “ViewResult” ?
Explain tempdata in asp.net mvc?
How do you assign a value to a complex number 7 how has exception hand changed in .net framework 4.0?
How to return the JSON from action method in ASP.Net MVC?
Explain the methods used to render the views in ASP.Net MVC?
mention what is code first approach and model first approach in entity framework?