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


Please Help Members By Posting Answers For Below Questions

Explain the .net framework.

714


Where are the routing rules defined in an asp.net mvc application?

744


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?

1928


explain how you can load related entities in ef (entity framework)?

734


What is difference between html.beginform and ajax.beginform?

771






What is oauth in web api?

704


What is storage model? : Entity framework

733


What is entity framework in asp net?

716


Explain dependency resolution?

806


differences between poco, model first and data first approach?

816


What is a model in android?

656


What are ajax helpers in asp.net mvc?

778


what is use of entitydatasource control?

814


How we can call a JavaScript function on the change of a Dropdown List in ASP.Net MVC?

739


What is Separation of Concerns in ASP.NET ASP.Net MVC?

790