C#.NET frequently asked questions and answers – C#.NET

Use of abstraction - Abstraction is used to create a common set of methods that might have different specific implementations by subclasses...
Use of encapsulation - Encapsulation hides the internal state and behavior of an object...
Differentiate between instance data and class data - Class data in terms of static class is the data that particular class holds in its structure...
Explain the significance of static method - Static methods are used when we want only one copy of that method to perform action and remain active at a single point in time...
Explain the uses of boxing and unboxing - Boxing and Unboxing are used to convert value types into reference types and vice versa...
Explain how to use the finally statement - Finally statement is executed always irrespective of any condition or error occurring in a method...
Explain the steps to create a .NET Assembly - Add a project from templates called “Class Library”...
Steps to create and implement Satellite Assemblies - Satellite assemblies are resource assemblies specific to language/culture...
Explain the purpose of ResourceManager class - Use ResourceManager class to retrieve resources that exist in an assembly...
Steps to prepare culture-specific formatting - The NumberFormatInfo class is used to define how symbols, currencies etc are formatted based on specific cultures...
Steps to implement localizability to the user interface - Implementation consists of basically translating the UI...
What are Trace Listeners and Trace Switches? - Trace listeners are objects that are used to receive store and route tracing information...
Explain how to implement tracing - In web.config, set EnableTracing=”true”...
Explain all the windows that help with your debugging - This window provides a description for the flow of application till the current line where the debugger is pointing to. It gives the page information, method name, arguments, line number etc...
Explain the Debug class methods - Assert:This method checks for a condition. It displays a user message if the condition is false...
Steps to create a setup program that will install or uninstall a web application - Right click on the setup project and add Project output...
Explain the steps to deploy a web application - Add a websetup project to the application solution...
Explain the steps to add assemblies to the Global Assembly Cache - sn -k StrongNameFile.snk – creates a strong key...
Steps in using XCOPY to deploy a web application...
Explain the methods of windows-based authentication - Anonymous authentication gives access to read-only areas of the Web site which do not need any username and password. ...
Explain how to create windows forms using visual inheritance - Create a windows form called the basewindow...
Explain the key events in the lifecycle of the form - Load: fired when form is first loaded in the application...
.MenuItem item1=new MenuItem();....
What is Anchoring a control and Docking a control? - Anchoring: used to resize controls dynamically with the form....
What is ErrorProvider control? - It is a control to provide a feedback about another control that has an error...
Explain the different types of windows control you can create in .NET - Common controls: textbox, button...
Explain how to build a composite control - Steps to create a Composite control:..
Explain how to license your control - Create Activex Control that needs license at runtime: Assume control...
What are Strong Named Assemblies? - They are the assemblies which can be uniquely identified by attaching the strong name to the dll name...
Explain the ways to deploy your windows application - Merge Module Project: Allows the package of the components to be shared between multiple applications...
Explain 3 types of configuration files in windows application in .NET - Application Coniguration:They contain configuration settings specific to applications...
Ways to optimize the performance of a windows application - Knowing when to use StringBuilder...
What is Code-Access security? - Code access security is a mechanism that helps limit the access to the code by protecting...
What is Role-based security? - Application that provide access to its data based on credentials check, verify the user’s role...
Explain steps to deploy an XML web service - To deploy the XML Web service, once can add a Web Setup project using project templates...
Steps to secure an XML web service - a) Secure the transport layer...
Demonstrate how to access unmanaged code using Interop - Use System.Runtime.InteropServices...