ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  Dot Net  >>  Dot Net Framework
 
 


 

 
 Dot Net Framework interview questions  Dot Net Framework Interview Questions
 Dot Net Remoting interview questions  Dot Net Remoting Interview Questions
 Dot Net WindowsForms interview questions  Dot Net WindowsForms Interview Questions
 Dot Net General interview questions  Dot Net General Interview Questions
 Dot Net AllOther interview questions  Dot Net AllOther Interview Questions
Question
what are generics? Without generics what are the
disadvantages in 1.1?
 Question Submitted By :: Swapna
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what are generics? Without generics what are the disadvantages in 1.1?
Answer
# 1
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 ?    4 Yes 0 No
Purushottam.ambati@gmail.
 
  Re: what are generics? Without generics what are the disadvantages in 1.1?
Answer
# 2
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 ?    1 Yes 0 No
Lakshmi
 
 
 

 
 
 
Other Dot Net Framework Interview Questions
 
  Question Asked @ Answers
 
In which circumstances you used delegates? HP3
What are the different authentication modes in the .NET environment?  2
How do assemblies find each other?  1
Difference between <connectionstring> and <appsettings>  3
Tell me about the internal working of Garbage collector? Honeywell2
How do you sort a dataset?  2
What are the mobile devices supported by .net platform  1
What are the ways to deploy an assembly?  1
What is Global Assembly Cache (GAC) and what is the purpose of it?  2
What is different between User Control and Web Control and Custom Control?  1
If we write return statement in finally block will it works fine or throws any error? Kanbay5
What is namespace used for loading assemblies at run time and name the methods?  2
reading doc file in textbox using .net2005 with c#  3
How do you do role based security ? Accenture1
If background completes its processing will it wait for foreground threads? Kanbay1
What are the methods in Thread class?  1
What is "out" parameter how it is used in methods? Polaris6
What is strong name?  4
What is gacutil.exe. Where do we store assemblies ? Accenture2
Integer & struct are value types or reference types in .NET?  3
 
For more Dot Net Framework Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com