Wednesday, March 14, 2012

C Sharp Interview Questions

Dot Net Interview Questions

Question. Lets start with .NET, What is .NET framework?
Answer. Its a platform to run .NET application, where .net applications can use .net resources.
Question. What is DLL?
Answer. Dynamic link libraries, kind of exe file.
Question. What is manifest?
Answer. Contains Details about assembly. like reference, versions, resources and type.
Question. What types of assemblies are there and what is difference?
Answer. Private and public
private is private to application and kept in local application folder
public assemblies are shared among the applications and kept in GAC.
Question. Suppose there is two versions of a assembly, how your application will decide which version to use?
Answer. In web.config under binding give old version and new version
Q. Any other way to do versioning in GAC?
Answer. Find it out.
Q. What is strong type and loose type ?
Answer. its a language property. The language who provide variable data type declaration called loose type like vb and JavaScript provide var type variable declaration while C# not. so C# is strong type language. 
 

Ques: What is Intermediate Language(IL)/MSIL/CIL in .NET
Sol: IL = Intermediate Language
MSIL = Microsoft intermediate Language
CIL = Common Intermediate Language
IL, MSIL and CIL are the same thing. When we compile .NET project it not directly converted to binary code i converted to Intermediate language. And when we run the project IL is converted into binary code at run time. every language of .NET programming is converted into IL. Only some part of IL which is required at run time is converted into binary code. DLL and EXE of .NET are also in IL form.
C# Interview Questions
 
Question. What is difference between arraylist and array?
Answer. Array can store single data type and inserting will cost more, while in array list you can store multiple datatypes and inserting and removing element is easy.
 
Question. What are delegates?
Answer. it is function to pointer.
 
Question. What are events?
Answer. events are used with delegate to fire a method on any event occurrence?
 
Question. What is use of delegate?
Answer. Delegates are used to call a function.
 
Question. What is difference between list and arraylist.
Answer. list is interface while arraylist is implementation.
 
Question. What is dataset?
Answer. can contains tables and their relations.
 
Question. What is datareader?
Answer. Read one row at a time , forward only.
 
Question. What is abstraction?
Answer. Representing complex word in simplified manner.
Question. What is Objects?
Answer. by using Objects we can represent real word easily.
Question. what are the features of objects oriented programming?
encapsulation
overloading
overriding
abstraction
association
generalization
inheritance
data hiding
 
Question. What is Strongly typed dataset?
Answer. Strongly typed dataset is simple dataset containing the property to have datatype associated with columns and can access column values by using the column names.

1 comments:

sarabjeet said...

Great work, really appreciate your effort for the information and being enrolled in http://www.wiziq.com/course/46-INTERVIEW-PREPARATION-COURSE-BY-SHIVPRASAD-KOIRALA the OOps, .NET and SQL INTERVIEW Preparation i found your information very helpful.

 
Powered by Code Imagine