Monday, July 2, 2012

Multiple inheritance in C#.Net


Does C#.Net support multiple inheritance?


No, C#.Net does not support multiple inheritance,  but we can use interfaces to achieve functionality of multiple inheritance.

What is serialization


Explain serialization ?


Serialization is a process of converting an object into a stream of bytes. .Net has 2 serializers namely XMLSerializer and SOAP/BINARY Serializer. Serialization is maily used in the concept of .Net Remoting.

How to force garbage collector to run


Is this possible to force garbage collector to run? 


Yes, we can force garbage collector to run using following code.
System.GC.Collect().

Role of .Net data provider


What is the role of data provider?


The .NET data provider layer resides between the application and the database. Its task is to take care of all their interactions. The .NET Data provider can be demonstrated to be:
SQL Server data provider 
OLEDB data provider 
ODBC Data Provider


ADO.NET supports the following OLE DB Providers:
- SQLOLEDB - Microsoft OLE DB Provider for SQL Server.
- MSDAORA - Microsoft OLE DB Provider for Oracle.
- Microsoft.Jet.OLEDB.4.0 - OLE DB Provider for Microsoft Jet.

Compilation and Execution of .Net application


Describe how a .Net application is compiled and executed?


From the source code, the compiler generates Microsoft Intermediate Language (MSIL) which is further used for the creation of an EXE or DLL. The CLR processes these at runtime. Thus, compiling is the process of generating this MSIL. The way you do it in .Net is as follows:
Right-click and select Build / Ctrl-Shift-B / Build menu, Build command
F5 - compile and run the application. 
Ctrl+F5 - compile and run the application without debugging.


Compilation can be done with Debug or Release configuration. The difference between these two is that in the debug configuration, only an assembly is generated without optimization. However, in release complete optimization is performed without debug symbols.