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

How to enable Attribute Routing?

619


what do you mean by table-per-hierarchy?

600


I want to fetch data from datareader. i have three tables in datareader. i want to bind my two table with datagrid, then i want to fetch a value from my third table. do u have any idea pls help me. we use dr.nextresult() for multiple tables.

2171


What are child actions in ASP.Net MVC?

582


Explain .Net Framework? Why we use it?

611






i just want to write an exam regarding .net?plz give me information about taking a test?where to pay 4 d exam,exam centre?

1813


What is storage model? : Entity framework

556


Explain what is asp.net mvc?

656


Can any particular component of .net framework 3.0 be removed?

520


What is viewbag title?

529


what is minimum requirement for entity framework applications to run?

579


What are the main components of .net framework?

548


Possible ways to prevent xss attacks on mvc application?

575


What is Differnce between html.action and ajax.action?

570


Is dapper faster than entity framework?

532