Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what are generics? Without generics what are the
disadvantages in 1.1?

Answer Posted / lakshmi

They are tad similar to C++ templates. With .net 1.0,
creating a flexible class or method that should use classes
that are known at compile time must be based on the object
class. With the object class, theres no type safety during
compile time. casting is necessary. Also, using the object
class for value types has a performance impact. .Net 2.0
supports generics, with generics the object class is no
longer necessary in such scenarios. Generic classes make
use of generic types that are replaced with specific types
as needed. This allows for typesafety. The
system.collections.Generic namespace gives you access to
generic versions of the stack, dictionary,
sorted dictionary, list and queue classes.
Advantages: Binary code reuse, performance, easy of
reading, typesafety.

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does �side by side� work for the .net framework 3.0?

902


What are the differences between Partial View and Display Template and Edit Templates in ASP.Net MVC?

1005


Can you explain the page life cycle of mvc?

942


What are the components of the .net framework.

994


How does servicing work for the .net framework 3.0? If I install the .net framework 3.0, can I get service updates for the .net framework 2.0?

902


What is controllercontext?

990


Which are the important namespaces used in ASP.Net MVC?

1035


How can I tell what .net framework is installed?

906


Mention some action filters which are used regularly in ASP.Net MVC?

939


how do you mark a property as required? For example, for a project, the name is a required field.

1001


What is the mvc pattern (model view controller pattern)?

956


Can a view be shared across multiple controllers? If yes, how we can do that?

1005


What are the major improvements provided by the common language runtime and the base class libraries? Or what are the major improvements in .net framework 4.0?

937


which are the key concepts of entity data model?

1010


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

915