1.What is a stack? What is a heap?
Ans : Stack is a place in the memory where value types are stored. Heap is a place in the memory where the reference types are stored.
2.What is Boxing/Unboxing?
Ans : Boxing is used to convert value types to object.
E.g. int x = 1;
object obj = x ;
Unboxing is used to convert the object back to the value type.
E.g. int y = (int)obj;
3.What is globalization?
Ans : Globalization is the process of customizing applications that support multiple cultures and regions.
4.What is localization?
Ans : Localization is the process of customizing applications that support a given culture and regions.
5.What is Ilasm.exe used for?
Ans : Ilasm.exe is a tool that generates PE files from MSIL code. You can run the resulting executable to determine whether the MSIL code performs as expected.
6.What is Ildasm.exe used for?
Ans : Ildasm.exe is a tool that takes a PE file containing the MSIL code as a parameter and creates a text file that contains managed code.
7.What is the ResGen.exe tool used for?
Ans : ResGen.exe is a tool that is used to convert resource files in the form of .txt or .resx files to common language runtime binary .resources files that can be compiled into satellite assemblies.
8.What happens when you change the web.config file at run time?
Ans : ASP.NET invalidates the existing cache and assembles a new cache. Then ASP.NET automatically restarts the application to apply the changes.
9.Explain the AutoPostBack feature in ASP.NET?
Ans : AutoPostBack allows a control to automatically postback when an event is fired. For eg: If we have a Button control and want the event to be posted to the server for processing, we can set AutoPostBack = True on the button.
10.What are Master Pages?
Ans : Master pages is a template that is used to create web pages with a consistent layout throughout your application. Master Pages contains content placeholders to hold page specific content. When a page is requested, the contents of a Master page are merged with the content page, thereby giving a consistent layout.
11.What are the types of Caching?
Ans : 1.Application Cache 2.Page Output Cache 3.Variable Cache
12.Method Parameters in C#?
Ans : 1. REF,2. OUT,3.PARAMS
13.What’s the .NET datatype that allows the retrieval of data by a unique key?
Ans : HashTable.
14.How do you debug an ASP.NET Web application?
Ans : Attach the aspnet_wp.exe process to the DbgClr debugger.
15.What is the syntax to inherit from a class in C#?
Ans : Place a colon and then the name of the base class.
Example: class MyNewClass : MyBaseClass
16.What’s a bubbled event?
Ans : When you have a complex control, like DataGrid, writing an event processing routine for each object (cell, button, row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its constituents.
17.What does WSDL stand for?
Ans : Web Services Description Language.
18.Can you override private virtual methods?
Ans : No, moreover, you cannot access private methods in inherited classes, have to be protected in the base class to allow any sort of access.
19.What is an out parameter?
Ans : An out parameter allows an instance of a parameter object to be made inside a method. Reference parameters must be initialised but out gives a reference to an uninstanciated object.
20.What is recursion?
Ans : Recursion is when a method calls itself.
21.Name 10 C# keywords.
Ans : abstract, event, new, struct, explicit, null, base, extern, object, this
22.What is a DLL?
Ans : A set of callable functions, which can be dynamically loaded.
23.What is unsafe code?
Ans : Unsafe code bypasses type safety and memory management.
24.How would you read and write using the console?
Ans : Console.Write, Console.WriteLine, Console.Readline
25.What’s the difference between // comments, /* */ comments and /// comments?
Ans : Single-line comments, multi-line comments, and XML documentation comments.