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

What is ado.net data provider? : Entity framework

562


what is entity graph in entity framework?

615


What is .net architecture and framework?

571


In .net compact framework, can we free memory explicitly without waiting for garbage collector to free the memory?

543


Explain the request flow in asp.net mvc framework?

543






What is domain class model?

512


When will the .net framework 3.0 be released?

544


What is .net framework & its benefits?

514


What are scaffold templates in mvc?

576


Can I add mvc testcases in visual studio express?

588


Which filter executes first in an asp.net mvc application?

547


What are Validation Annotations?

569


mention what is the difference between ado.net and classic ado?

565


In Server how to check whether model has error or not in ASP.Net MVC

617


What is the significance of nonactionattribute?

577