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
What is the use of the default route?
What is the meaning of unobtrusive javascript?
What is entitytypes? : Entity framework
If we write any code for DataGrid methods, what is the access specifier used for that methods in the code behind file and why?
How we can call a javascript function on the change of a dropdown list in mvc?
what is deferred loading(lazy loading)?
Where is the new functionality in the .net framework 3.0 (such as wcf, wf, wpf, and cardspace) installed to? Is that different from where the .net framework 2.0 is installed to?
What is controllercontext?
What is razor code?
What is needed for running an application built on winfx on the .net framework 3.0?
Which .net framework is installed?
How to change the action name in mvc?
What is iobjectset? : Entity framework
What is the use of web api ? Why web api needed, if you have already restful services using wcf ?
Is it possible to share a view across multiple controllers?