Thursday, 30 December 2010

What is a Microsoft Intermediate Language?

Intermediate Language. Also known as MSIL (Microsoft Intermediate Language) or CIL (Common Intermediate Language). All .NET source code (of any language) is compiled to MSIL.

When compiling the source code to managed code, the compiler translates the source into Microsoft intermediate language (MSIL). This is a CPU-independent set of instructions that can efficiently be converted to native code. Microsoft intermediate language (MSIL) is a translation used as the output of a number of compilers. It is the input to a just-in-time (JIT) compiler. The Common Language Runtime includes a JIT compiler for the conversion of MSIL to native code.

Before Microsoft Intermediate Language (MSIL) can be executed it, must be converted by the .NET Framework just-in-time (JIT) compiler to native code. This is CPU-specific code that runs on the same computer architecture as the JIT compiler. Rather than using time and memory to convert all of the MSIL in a portable executable (PE) file to native code. It converts the MSIL as needed whilst executing, then caches the resulting native code so its accessible for any subsequent calls.

Friday, 24 December 2010

Collection Class

Que:- What�s the .NET datatype that allows the retrieval of data by a unique key?
Ans:- HashTable.

What does the "EnableViewState" property do?

It allows the page to save the users input on a form across postbacks.  It
saves the server-side values for a given control into ViewState, which
is stored as a hidden value on the page before sending the page to the
clients browser.  When the page is posted back to the server the server
control is recreated with the state stored in viewstate.

What is MSIL, ??

MSILis the Microsoft Intermediate Language. All .NET compatible languages will get converted to MSIL. 

 MSIL also allows the .NET Framework to JIT compile the assembly on the installed computer.

What�s a bubbled event?

  When you have a complexcontrol, 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.

Where do you store the information about the user�s locale?

System.Web.UI.Page.Culture
 

Tuesday, 21 December 2010

What is Static Method?

Methods that you can call directly without first creating an instance of a class. Eg: Main() Method, Console.WriteLine()
You can use static fields, methods, properties and even constructors which will be called before any instance of the class is created
 As static methods may be called without any reference to object, you can not use instance members inside static methods or properties, while you may call a static member from a non-static context. The reason for being able to call static members from non-static context is that static members belong to the class and are present irrespective of the existence of even a single object