Advanced c# Interview Questions and Answers Part 2

By
1.)  What Namespaces are used  to create a localized application ?                          
  • System.Globalization
  • System.Resources
2.)  What are the different type of comment is used in .NET ?                                      
  • //             - -->  Signal Line
  • /* */        - -->  MultiLine
  • ///           --->  XML Documentation Comments
3.)  is XML is case sensitive ?                                                                                                       
Yes.
Ex. Here <EMPLOYEE> and <employee> are different element.

4.)  What is the different between <c> and <code> XML documentation code?  
It is example of single line code and multi-line code.

5.)  What debugging tools inbuilt with .NET SDK?                                                           
  • CorDBG --> Command line Debugger
  • DbgCLR --> Graphic debugger
6.) What is the use of CorDBG and DbgCLR ?                                                                     
  • Visual studio .NET uses  DbgCLR .
  • CorDBG is used for compile the original C# file using /debug switch.
7.) What does This Window show in the Debugger ?                                                      
It (This Window) points to the object that is pointed to by This reference. Object's instance data is shown.

8.) What does ASSERT() method do ?                                                                                   
 In  debug compilation, assert() takes in a Boolean condition as a parameter and shows the error dialog if the condition is false.If condition is true then program proceeds without an interruption.

9.) What is the difference between the debug class and trace class?                       
  • Debug class is used for debug builds.
  • Trace class is used for both debug and release builds.
10.) Why are there five tracing levels in System.Diagnostics.TraceSwitcher?    
The tracing dump can be quite verbose and for some application that are constantly running ,we run the risk of overloading the machine and the hard drive there.Five levels range from None to Verbose,allowing to fine tune the tracing activities.

11.) How do you debug an ASP.NET Web application ?                                                  
We debug an asp.net web application by attaching aspnet_wp.exe process to the DbgCLR debugger. 

12.) Where is the output of TestWriterTraceListener redirected?                          
The Output of TestWriterTraceListener redirected to the console or a text file depending on the parameter passed to the constructor.

0 comments:

Post a Comment

Powered by Blogger.