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 the .net framework.
Where are the routing rules defined in an asp.net mvc application?
what is more complex to implement property, methods or event? how can I define criteria to compare the difficulty of implementation between them? for example the number of methods wanted to implements property is 2 methods. how many methods I need it to implements events?
explain how you can load related entities in ef (entity framework)?
What is difference between html.beginform and ajax.beginform?
What is oauth in web api?
What is storage model? : Entity framework
What is entity framework in asp net?
Explain dependency resolution?
differences between poco, model first and data first approach?
What is a model in android?
What are ajax helpers in asp.net mvc?
what is use of entitydatasource control?
How we can call a JavaScript function on the change of a Dropdown List in ASP.Net MVC?
What is Separation of Concerns in ASP.NET ASP.Net MVC?