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 ado.net data provider? : Entity framework
what is entity graph in entity framework?
What is .net architecture and framework?
In .net compact framework, can we free memory explicitly without waiting for garbage collector to free the memory?
Explain the request flow in asp.net mvc framework?
What is domain class model?
When will the .net framework 3.0 be released?
What is .net framework & its benefits?
What are scaffold templates in mvc?
Can I add mvc testcases in visual studio express?
Which filter executes first in an asp.net mvc application?
What are Validation Annotations?
mention what is the difference between ado.net and classic ado?
In Server how to check whether model has error or not in ASP.Net MVC
What is the significance of nonactionattribute?