.NET Interview Questions and Answers Part 3

1.) What is CCW  ?                                                                                                                            
This is also called  COM Callable Wrapper.A proxy object generated by the common language runtime(CLR) so that existing COM applications can use managed classes, including .NET Framework classes, transparently.
2.) When do we absolutely have to declare a class as abstract  ?                                 
  • When at least one of the methods in the class is abstract. 
  • When the class itself is inherited from an abstract class and no base abstract methods have been over-ridden.
3.)Why can’t we specify the accessibility modifier for methods inside the  interface 
They all must be public. Therefore, to prevent from getting the false impression that we have any freedom of choice, we are not allowed to specify any accessibility, it is public by default.
4.)  Is it namespace class or class namespace ?                                                                   The .NET class library is organized into namespaces. Each namespace contains a functionally related group of classes so natural namespace.
5.)  What is the difference between the Debug class and Trace class ?                   
        You can use Debug class for debug builds and use Trace class for both debug and release builds. 
6.)  Where is the output of TextWriterTraceListener redirected ?                            
It is the Console or a text file depending on the parameter passed to the constructor.
7.)  Can we change the value of a variable while debugging a C# application ?     
YES,if We are debugging via Visual Studio.NET, just go to Immediate window.
 8.) Which one is trusted and which one is untrusted ? Windows Authentication or  SQL Server authentication   
SQL Server authentication is untrusted, since SQL Server is the only verify participating in the transaction.Windows Authentication is trusted because the username and password are checked with the Active Directory.
9.)  What is the data provider name to connect to Access database?                          
It is Microsoft.Access .
10.)  What does Dispose method do with the connection object?                                 
This is helful to Delete it from the memory.
 11.)  What is a pre-requisite for connection pooling?                                                        There are Multiple processes must agree that they will share the same connection, where every parameter is the same, including the security settings.  
12.)  What is the use ContextUtil Class in .net?                                                      
The ContextUtil is the preferred class to use for obtaining COM+ context information.


Post a Comment

Powered by Blogger.