February 17
If you have any questions in mind please mail them to me at namratha1@gmail.com in the below format.
E.g.
Usergroup : Mumbaisuergroup.
Nick Name : Nasha
Question : Explain ur Q in brief
What is a diff between an abstract class and an interface ? What would govern your decision for its usage in .NET?
-- A an abstract class is a class which cannot be instantiated and an interface is a set of functions. Thier usage would goverened by the follwoing reasons :-
a. If I have some common functions to be implemeted in the base class then one should use abstract class as Interface cannot have funcation implementations.
b. Languages like C# and VB.NET only allow single inheritance of classes hence you have only one base class and rest will have to be created as interfaces.
e.g. If I did my class A to inherit from Class B and Class C .. then inheritance can only be done from one of these classes the one will have to created as an interface.
What are the different types of polymorphism ?
-- There are two types of polymorphism inheritance based and interface based. In Inheritance based you have a common base class and in interface based you have a common interface between classes.
How can you view the procedure text from Query Analyser ?
-- Use sp_helptext <procedure name>
Can you have two applications on the same machine one which is using .NET Framework 1.0 and the other using 1.1 ?
-- Yes
You have an application which yoour client is going to view from his end. If you dont want the cleint to view details of the error message then what will you do?
-- Set the custom errors property of to Remoteonly. The other two options are On which will not display the error details on both remote as well as local machine and the other one is Off which is always display the complete error message on both remote as well as local machine.
If you are using a web service and you want its path to be picked up from the config file what will you do ?
-- Set its behaviour property to dynamic this will add a new appSetting entry in the config file for the webservice path.
Can I view Intermediate Language of a .NET assembly?
-- Yes. MS supply a tool called Ildasm, which can be used to view the metadata and IL for an assembly.
What is the maximum number of classes a .NET DLL can contain?
-- Unlimited
Can you call the garbage collector explicitly?
-- System.GC class exposes a Collect method - this forces the garbage collector to collect all unreferenced objects immediately.
Can I serialize Hash table with XmlSerializer?
-- XmlSerializer will refuse to serialize instances of any class that implements IDictionary, e.g. Hash table. Soap Formatter and Binary Formatter do not have this restriction.
What is difference between "tlbexp" and "Regasm" tools?
-- Both these tools are used to create CCW from a .NET Assembly, the only difference being that Tlbexp will not register the type library unlike regasm.