Asp.Net Interview Questions
 
Q: Why Datareader is useful?
Ans : DataReaders are different–they provide forward-only, read-only, connected access to data sources, and they don't support data manipulation. So why would you want to use something that limits you so much? Performance, for starters: DataReaders are much faster. Another benefit is a smaller memory footprint–DataReaders allow you to work with data as you get it, a row at a time. So DataReaders are particularly well-suited for working with data that's too large to fit in memory comfortably. A DataReader is a read-only stream of data returned from the database as the query executes. It only contains one row of data in memory at a time and is restricted to navigating forward only in the results one record at a time
Date submitted :3/24/2010 2:48:22 AM
Submitted by : shabir@myfaithsolution.com

Q: What is Viewstate?
Ans : View state provides state information for a specific ASP.NET page. If you need to use information on more than one page, or if you need the information to persist across visits to the Web site, you should use another method for maintaining state, such as application state, session state or personalization.
Date submitted :3/24/2010 2:48:22 AM
Submitted by : shabir@myfaithsolution.com

Q: Briefly describe the major components of the .NET Framework and describe what each component does?
Ans : The .NET Framework consists of two primary parts: the common language runtime, which manages application execution, enforces type safety, and manages memory reclamation, and the .NET base class library, which consists of thousands of predeveloped classes that can be used to build applications.
Date submitted :3/22/2010 2:27:24 PM
Submitted by : Shabir@myfaithsolution.com

Q: How do you enable your application to use .NET base class library members without referencing their fully qualified names?
Ans : Use the Imports keyword (Visual Basic .NET) or the using keyword (Visual C#) to make a .NET Framework namespace visible to your application.
Date submitted :3/22/2010 2:27:59 PM
Submitted by : Shabir@myfaithsolution.com

Q: Briefly describe what members are, and list the four types of members?
Ans : Members are the parts of a class or a structure that hold data or implement functionality. The primary member types are fields, properties, methods, and events.
Date submitted :3/22/2010 2:28:50 PM
Submitted by : Shabir@myfaithsolution.com

Q: Explain what constructors and destructors are and describe what they are used for.?
Ans : The constructor is the method that initializes a class or structure and is run when a type is first instantiated. It is used to set default values and perform other tasks required by the class. A destructor is the method that is run as the object is being reclaimed by garbage collection. It contains any code that is required for cleanup of the object.
Date submitted :3/22/2010 2:29:25 PM
Submitted by : Shabir@myfaithsolution.com

Q: Briefly explain the difference between Public (public), Friend (internal), and Private (private) access levels as they apply to user-defined types and members.?
Ans : In user-defined types, Public (public) classes can be instantiated by any element of the application. Friend (internal) classes can be instantiated only by members of the same assembly, and Private (private) classes can be instantiated only by themselves or types they are nested in. Likewise, a Public (public) member can be accessed by any client in the applica-tion, a Friend (internal) member can be accessed only from members of the same assembly, and Private (private) members can be accessed only from within the type.
Date submitted :3/22/2010 2:29:55 PM
Submitted by : Shabir@myfaithsolution.com

Q: Describe two ways to set the tab order of controls on your form.?
Ans : You can set the tab order in Visual Studio by choosing Tab Index from the View menu and clicking each control in the order you desire. Alternatively, you can set the TabIndex property either in code or in the Properties window.
Date submitted :3/22/2010 2:30:37 PM
Submitted by : Shabir@myfaithsolution.com

Q: What is an extender provider, and what does one do?
Ans : Extender providers are components that provide additional properties to controls on a form. Examples include the ErrorProvider, HelpProvider, and ToolTip components. They can be used to provide additional information about particular controls to the user in the user interface.
Date submitted :3/22/2010 2:31:04 PM
Submitted by : Shabir@myfaithsolution.com

Q: Explain when you might implement a shortcut menu instead of a main menu. ?
Ans : If every possible option is exposed on a main menu, the menu can become busy and hard to use. Shortcut menus allow less frequently used options to be exposed only in situations where they are likely to be used.
Date submitted :3/22/2010 2:31:38 PM
Submitted by : Shabir@myfaithsolution.com

Q: Explain when a type conversion will undergo an implicit cast and when you must perform an explicit cast. What are the dangers associated with explicit casts?
Ans : Types can be implicitly converted when the conversion can always take place without any potential loss of data. When a potential loss of data is possible, an explicit cast is required. If an explicit cast is improperly performed, a loss of data precision can result, or an exception can be thrown.
Date submitted :3/22/2010 2:32:08 PM
Submitted by : Shabir@myfaithsolution.com

Q: What is a native image? How do you create one?
Ans : A native image is a precompiled version of a .NET assembly. You can create a native image of your application by using the Ngen.exe utility.
Date submitted :3/22/2010 2:32:47 PM
Submitted by : Shabir@myfaithsolution.com

Q: What is the purpose of a bootstrapper application? When do you not need to create one?
Ans : A bootstrapper application automatically detects if Windows Installer is installed on the target machine. If Windows Installer is not present, it installs Windows Installer before proceeding with the rest of the installation. You should create a bootstrapper application unless all of your target machines are running Windows XP (which has Microsoft Windows Installer 1.5 already installed) or have had Microsoft Installer 1.5 installed previously. Double-click MANIFEST under MyConsoleApp.exe to view the assembly manifest. The assembly manifest for the application created in Visual Basic .NET
Date submitted :3/22/2010 2:33:32 PM
Submitted by : Shabir@myfaithsolution.com

Q: What are the similarities and the differences between the assembly manifests contained within the two assemblies?
Ans : The assembly manifests of both assemblies contain the name, version, and public key token information of the assemblies that they depend upon. Both assemblies depend on the mscorlib assembly. However, the assembly created in Visual Basic .NET additionally depends on the Microsoft.VisualBasic assembly.
Date submitted :3/22/2010 2:34:10 PM
Submitted by : Shabir@myfaithsolution.com

Q: What are the different types of assemblies?
Ans : The different types of assemblies include Static and dynamic assemblies Private and shared assemblies Single-file and multiple-file assemblies What are the different types of configuration files that the .NET Framework provides? Machine configuration file. This file is located in the %runtime installation path%\Config directory. The machine configuration file contains settings that affect all the applications that run on the machine. Application configuration file. This file contains the settings required to configure an individual application. ASP.NET configuration files are named Web.config, and application configuration files are named App.exe.config, where App.exe is the name of the executable. Security configuration file. The security configuration files contain security permissions for a hierarchy of code groups. The security configuration files define the enterprise-level, machine-level, and user-level security ?policies. The Enterprisesec.config file defines the security policies for the enterprise. The machine-level Security.config file defines the security policy for the machine, whereas the user-level Security.config file defines the security policy for a user.
Date submitted :3/22/2010 2:34:42 PM
Submitted by : Shabir@myfaithsolution.com

Q: What are application domains?
Ans : Application domains are the boundaries within which applications run. A process can contain multiple application domains. Application domains provide an isolated environment to applications that is similar to the isolation provided by processes. An application running inside one application domain cannot directly access the code running inside another application domain. To access the code running in another application domain, an application needs to use a proxy.
Date submitted :3/22/2010 2:35:07 PM
Submitted by : Shabir@myfaithsolution.com

Q: What are the states of a service application?
Ans : The states in which a service application can remain are running, paused, stopped, and pending.
Date submitted :3/22/2010 2:35:34 PM
Submitted by : Shabir@myfaithsolution.com

Q: What are the different types of Windows services?
Ans : Windows services are of two types: Win32OwnProcess and Win32ShareProcess services. Each Win32OwnProcess runs in its own process space, whereas Win32ShareProcess services share a process space with other services
Date submitted :3/22/2010 2:36:00 PM
Submitted by : Shabir@myfaithsolution.com

Q: Why do you need to include installers in your service application?
Ans : The installers enable you to install a Windows service and resources, such as custom logs and performance counters, that a service application uses on a computer. The installers automatically install these resources when you install a service application using the Installutil tool.
Date submitted :3/22/2010 2:36:36 PM
Submitted by : Shabir@myfaithsolution.com

Q: What is a serviced component?
Ans : A serviced component is a class that derives from the System.Enterprise?Services.ServicedComponent class, which is the base class for all classes that use COM+ component services. You create and register each service component before it can access the COM+ services.
Date submitted :3/22/2010 2:37:18 PM
Submitted by : Shabir@myfaithsolution.com

Q: Which class do you need to define when creating serviced components?
Ans : To create a serviced component, you need to define a class that is derived directly from the ServicedComponent base class.
Date submitted :3/22/2010 2:37:46 PM
Submitted by : Shabir@myfaithsolution.com

Q: How do you assign a name and ID to a COM+ application?
Ans : The application ID serves as an index for all application searches made during the registration process. The application ID is assigned by using the ApplicationID attribute that is derived from the System.EnterpriseServices namespace.
Date submitted :3/22/2010 2:38:10 PM
Submitted by : Shabir@myfaithsolution.com

Q: What is the importance of the activation type attribute in the registration of a serviced component?
Ans : You use the activation type attribute to specify whether the created serviced component is created in the library of the caller process or in a new process of the server.
Date submitted :3/22/2010 2:38:46 PM
Submitted by : Shabir@myfaithsolution.com

Q: What are the requirements to enable communication between objects across remoting boundaries?
Ans : To enable communication between objects across remoting boundaries, you need A server object that exposes the functionality to callers outside its boundary A client that makes calls to the server object A transportation mechanism to pass the calls from one end to the other
Date submitted :3/22/2010 2:42:39 PM
Submitted by : Shabir@myfaithsolution.com

Q: Describe the two types of remotable objects.?
Ans : The two types of remotable objects are Marshal-by-value objects. These objects are copied and passed by value out of the application domain. Marshal-by-reference objects. The clients that use these objects need a proxy to access the object remotely.
Date submitted :3/22/2010 2:43:12 PM
Submitted by : Shabir@myfaithsolution.com

Q: Describe the two types of activation modes of the .NET Remoting system?
Ans : The two types of activation modes in the .NET Remoting system are Server activation. In server activation, objects are created on the server when you call a method in the server class. However, objects are not created when you use the new keyword to create an instance of the server class. Client activation. In client activation, objects are created on the server when you create an instance using the new keyword
Date submitted :3/22/2010 2:43:43 PM
Submitted by : Shabir@myfaithsolution.com

Q: How can you renew lifetime leases of objects?
Ans : You can renew the lifetime lease of an object in the following two ways: A client application calls the ILease.Renew method. A sponsor renews the lease.
Date submitted :3/22/2010 2:44:17 PM
Submitted by : Shabir@myfaithsolution.com

Q: Why do you use delegates in your remoting applications?
Ans : You use delegates to implement callback functions, event programming, and asynchronous programming in your remoting applications. Events use delegates to enable callback functions to the client in remoting applications. This enables the client and the remote application to function as domain servers. Therefore, you need to design a server/server application instead of designing a client/server application. What steps do you perform to implement asynchronous programming in a remoting application? The steps to implement asynchronous programming in a remoting application are Create an instance of an object that can receive a remote call to a method. Wrap that instance method with an AsyncDelegate method. Wrap the remote method with another delegate. Call the BeginInvoke method on the second delegate, passing any arguments, the AsyncDelegate method, and some object to hold the state. Wait for the server object to call your callback method.
Date submitted :3/22/2010 2:47:56 PM
Submitted by : Shabir@myfaithsolution.com

Q: What tasks do the data providers enable you to perform?
Ans : The classes of each data provider contain methods that enable you to perform the following tasks: Create a connection with a database Execute a SQL statement or stored procedure on a database Read data rows from a database in a forward-only mode Transfer data between a database and a DataSet Display error messages and warnings that a database returns Handle exceptions when a database returns an error or warning Execute Transact-SQL statements on a database
Date submitted :3/22/2010 2:48:33 PM
Submitted by : Shabir@myfaithsolution.com

Q: What does the “EnableViewState” property do? Why would I want it on or off?
Ans : Answer this
Date submitted :3/24/2010 3:40:49 AM
Submitted by : Shabir@myfaithsolution.com

Q: Why Datareader is useful?
Ans : Answer this
Date submitted :3/24/2010 3:49:04 AM
Submitted by : Shabir@myfaithsolution.com

Q: What does the “EnableViewState” property do? Why would I want it on or off?
Ans : Answer this
Date submitted :3/24/2010 5:26:46 AM
Submitted by : shabir@myfaithsolution.com

Q: What type of code (server or client) is found in a Code-Behind class?
Ans : The answer is server-side code since code-behind is executed on the server. However, during the code-behind's execution on the server, it can render client-side code such as JavaScript to be processed in the clients browser. But just to be clear, code-behind executes on the server, thus making it server-side code.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Should user input data validation occur server-side or client-side? Why?
Ans : All user input data validation should occur on the server at a minimum. Additionally, client-side validation can be performed where deemed appropriate and feasible to provide a richer, more responsive experience for the user.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is the difference between Server. Transfer and Response. Redirect? Why would I choose one over the other?
Ans : Server. Transfer transfers page processing from one page directly to the next page without making a round-trip back to the client's browser. This provides a faster response with a little less overhead on the server. Server. Transfer does not update the clients url history list or current url. Response. Redirect is used to redirect the user's browser to another page or site. This performs a trip back to the client where the client's browser is redirected to the new page. The user's browser history list is updated to reflect the new address.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Can you explain the difference between an ADO. NET Dataset and an ADO Record set?
Ans : Valid answers are: • A Dataset can represent an entire relational database in memory, complete with tables, relations, and views. • A Dataset is designed to work without any continuing connection to the original data source. • Data in a Dataset is bulk-loaded, rather than being loaded on demand. • There's no concept of cursor types in a Dataset. • Datasets have no current record pointer You can use For Each loops to move through the data. • You can store many edits in a Dataset, and write them to the original data source in a single operation. • Though the Dataset is universal, other objects in ADO. NET come in different versions for different data sources.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is the Global.asax used for?
Ans : The Global.asax (including the Global.asax.cs file) is used to implement application and session level events.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What are the Application_Start and Session_Start subroutines used for?
Ans : This is where you can set the specific variables for the Application and Session objects.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Can you explain what inheritance is and an example of when you might use it?
Ans : When you want to inherit (use the functionality of) another class. Example: With a base class named Employee, a Manager class could be derived from the Employee base class.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Whats an assembly?
Ans : Assemblies are the building blocks of the .NET framework. Overview of assemblies from MSDN
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Describe the difference between inline and code behind.
Ans : Inline code written along side the html in a page. Code-behind is code written in a separate file and referenced by the .aspx page.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Explain what a diffgram is, and a good use for one?
Ans : The DiffGram is one of the two XML formats that you can use to render DataSet object contents to XML. A good use is reading database data to an XML file to be sent to a Web Service.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Whats MSIL, and why should my developers need an appreciation of it if at all?
Ans : MSIL is 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.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Which method do you invoke on the DataAdapter control to load your generated dataset with data?
Ans : The Fill() method.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Can you edit data in the Repeater control?
Ans : No, it just reads the information from its data source.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Which template must you provide, in order to display data in a Repeater control?
Ans : ItemTemplate.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: How can you provide an alternating color scheme in a Repeater control?
Ans : Use the AlternatingItemTemplate.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What property must you set, and what method must you call in your code, in order to bind the data from a data source to the Repeater control?
Ans : You must set the DataSource property and call the DataBind method.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What base class do all Web Forms inherit from?
Ans : The Page class.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Name two properties common in every validation control?
Ans : ControlToValidate property and Text property.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?
Ans : DataTextField property
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Which control would you use if you needed to make sure the values in two different controls matched?
Ans : CompareValidator control.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: How many classes can a single .NET DLL contain?
Ans : It can contain many classes.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What does WSDL stand for?
Ans : Web Services Description Language
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Where on the Internet would you look for Web services?
Ans : http://www.uddi.org
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Which property on a Combo Box do you set with a column name, prior to setting the Data Source, to display data in the combo box?
Ans : DataTextField property
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Which control would you use if you needed to make sure the values in two different controls matched?
Ans : CompareValidator Control
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: True or False: To test a Web service you must create a windows application or Web application to consume this service?
Ans : False, the web service comes with a test page and it provides HTTP-GET method to test.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: How many classes can a single .NET DLL contain?
Ans : It can contain many classes.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is the difference between an EXE and a DLL?
Ans : You cancreate an objects of Dll but not of the EXE. Dll is an In-Process Component whereas EXE is an OUt-Process Component. Exe is for single use whereas you can use Dll for multiple use. Exe can be started as standalone where dll cannot be.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is strong-typing versus weak-typing?Which is preferred? Why?
Ans : Strong typing implies that the types of variables involved in operations are associated to the variable, checked at compile-time, and require explicit conversion; weak typing implies that they are associated to the value, checked at run-time, and are implicitly converted as required. (Which is preferred is a disputable point, but I personally prefer strong typing because I like my errors to be found as soon as possible.)
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is a PID? How is it useful when troubleshooting a system?
Ans : PID is the process Id of the application in Windows. Whenever a process starts running in the Windows environment, it is associated with an individual process Id or PID.The PID (Process ID) a unique number for each item on the Process Tab, Image Name list. How do you get the PID to appear? In Task Manger, select the View menu, then select columns and check PID (Process Identifier). In Linux, PID is used to debug a process explicitly. However we cannot do this in a windows environment. Microsoft has launched a SDK called as Microsoft Operations Management (MOM). This uses the PID to find out which dll™s have been loaded by a process in the memory. This is essentially helpful in situations where the Process which has a memory leak is to be traced to a erring dll. Personally I have never used a PID, our Windows debugger does the things required to find out.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is the CLR?
Ans : CLR = Common Language Runtime. The CLR is a set of standard resources that (in theory) any .NET program can take advantage of, regardless of programming language. Robert Schmidt (Microsoft) lists the folloswing CLR resources in his MSDN PDC# article: Object-oriented programming model (inheritance, polymorphism, exception handling, garbage collection) Security model Type system All .NET base classes Many .NET framework classes Development, debugging, and profiling tools Execution and code management IL-to-native translators and optimizers What this means is that in the .NET world, different programming languages will be more equal in capability than they have ever been before, although clearly not all languages will support all CLR services.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is the CTS?
Ans : CTS = Common Type System. This is the range of types that the .NET runtime understands, and therefore that .NET applications can use. However note that not all .NET languages will support all the types in the CTS. The CTS is a superset of the CLS. .
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is the CLS?
Ans : CLS = Common Language Specification. This is a subset of the CTS which all .NET languages are expected to support. The idea is that any program which uses CLS-compliant types can interoperate with any .NET program written in any language. In theory this allows very tight interop between different .NET languages - for example allowing a C# class to inherit from a VB class.  
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is IL?
Ans : IL = Intermediate Language. Also known as MSIL (Microsoft Intermediate Language) or CIL (Common Intermediate Language). All .NET source code (of any language) is compiled to IL. The IL is then converted to machine code at the point where the software is installed, or at run-time by a Just-In-Time (JIT) compiler. 
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What does 'managed' mean in the .NET context?>
Ans : The term 'managed' is the cause of much confusion. It is used in various places within .NET, meaning slightly different things.Managed code: The .NET framework provides several core run-time services to the programs that run within it - for example exception handling and security. For these services to work, the code must provide a minimum level of information to the runtime. Such code is called managed code. All C# and Visual Basic.NET code is managed by default. VS7 C++ code is not managed by default, but the compiler can produce managed code by specifying a command-line switch (/com+). Managed data: This is data that is allocated and de-allocated by the .NET runtime's garbage collector. C# and VB.NET data is always managed. VS7 C++ data is unmanaged by default, even when using the /com+ switch, but it can be marked as managed using the __gc keyword.Managed classes: This is usually referred to in the context of Managed Extensions (ME) for C++. When using ME C++, a class can be marked with the __gc keyword. As the name suggests, this means that the memory for instances of the class is managed by the garbage collector, but it also means more than that. The class becomes a fully paid-up member of the .NET community with the benefits and restrictions that brings. An example of a benefit is proper interop with classes written in other languages - for example, a managed C++ class can inherit from a VB class. An example of a restriction is that a managed class can only inherit from one base class.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is reflection?
Ans : All .NET compilers produce metadata about the types defined in the modules they produce. This metadata is packaged along with the module (modules in turn are packaged together in assemblies), and can be accessed by a mechanism called reflection. The System.Reflection namespace contains classes that can be used to interrogate the types for a module/assembly. Using reflection to access .NET metadata is very similar to using ITypeLib/ITypeInfo to access type library data in COM, and it is used for similar purposes - e.g. determining data type sizes for marshaling data across context/process/machine boundaries. Reflection can also be used to dynamically invoke methods (see System.Type.InvokeMember ) , or even create types dynamically at run-time (see System.Reflection.Emit.TypeBuilder).  
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is the difference between Finalize and Dispose (Garbage collection) ?
Ans : Class instances often encapsulate control over resources that are not managed by the runtime, such as window handles (HWND), database connections, and so on. Therefore, you should provide both an explicit and an implicit way to free those resources. Provide implicit control by implementing the protected Finalize Method on an object (destructor syntax in C# and the Managed Extensions for C++). The garbage collector calls this method at some point after there are no longer any valid references to the object. In some cases, you might want to provide programmers using an object with the ability to explicitly release these external resources before the garbage collector frees the object. If an external resource is scarce or expensive, better performance can be achieved if the programmer explicitly releases resources when they are no longer being used. To provide explicit control, implement the Dispose method provided by the IDisposable Interface. The consumer of the object should call this method when it is done using the object. Dispose can be called even if other references to the object are alive. Note that even when you provide explicit control by way of Dispose, you should provide implicit cleanup using the Finalize method. Finalize provides a backup to prevent resources from permanently leaking if the programmer fails to call Dispose. . 
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is Partial Assembly References?
Ans : Full Assembly reference: A full assembly reference includes the assembly's text name, version, culture, and public key token (if the assembly has a strong name). A full assembly reference is required if you reference any assembly that is part of the common language runtime or any assembly located in the global assembly cache. Partial Assembly reference: We can dynamically reference an assembly by providing only partial information, such as specifying only the assembly name. When you specify a partial assembly reference, the runtime looks for the assembly only in the application directory. We can make partial references to an assembly in your code one of the following ways: -> Use a method such as System.Reflection.Assembly.Load and specify only a partial reference. The runtime checks for the assembly in the application directory. -> Use the System.Reflection.Assembly.LoadWithPartialName method and specify only a partial reference. The runtime checks for the assembly in the application directory and in the global assembly cache.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Changes to which portion of version number indicates an incompatible change?
Ans : Major or minor. Changes to the major or minor portion of the version number indicate an incompatible change. Under this convention then, version 2.0.0.0 would be considered incompatible with version 1.0.0.0. Examples of an incompatible change would be a change to the types of some method parameters or the removal of a type or method altogether. Build. The Build number is typically used to distinguish between daily builds or smaller compatible releases. Revision. Changes to the revision number are typically reserved for an incremental build needed to fix a particular bug. You'll sometimes hear this referred to as the "emergency bug fix" number in that the revision is what is often changed when a fix to a specific bug is shipped to a customer.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is side-by-side execution? Can two application one using private assembly and other using Shared assembly be stated as a side-by-side executables?
Ans :  Side-by-side execution is the ability to run multiple versions of an application or component on the same computer. You can have multiple versions of the common language runtime, and multiple versions of applications and components that use a version of the runtime, on the same computer at the same time. Since versioning is only applied to shared assemblies, and not to private assemblies, two application one using private assembly and one using shared assembly cannot be stated as side-by-side executables.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Why string are called Immutable data Type ?
Ans : The memory representation of string is an Array of Characters, So on re-assigning the new array of Char is formed & the start address is changed . Thus keeping the Old string in Memory for Garbage Collector to be disposed.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What does assert() method do?
Ans : In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false. The program proceeds without any interruption if the condition is true.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What's the difference between the Debug class and Trace class?
Ans : Documentation looks the same. Use Debug class for debug builds, use Trace class for both debug and release builds.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Why are there five tracing levels in System.Diagnostics.TraceSwitcher?
Ans : The tracing dumps can be quite verbose. For applications that are constantly running you run the risk of overloading the machine and the hard drive. Five levels range from None to Verbose, allowing you to fine-tune the tracing activities.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Where is the output of TextWriterTraceListener redirected?
Ans : To the Console or a text file depending on the parameter passed to the constructor.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: How do assemblies find each other?
Ans : By searching directory paths. There are several factors which can affect the path (such as the AppDomain host, and application configuration files), but for private assemblies the search path is normally the application's directory and its sub-directories. For shared assemblies, the search path is normally same as the private assembly path plus the shared assembly cache.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: How does assembly versioning work?
Ans : Each assembly has a version number called the compatibility version. Also each reference to an assembly (from another assembly) includes both the name and version of the referenced assembly.The version number has four numeric parts (e.g. 5.5.2.33). Assemblies with either of the first two parts different are normally viewed as incompatible. If the first two parts are the same, but the third is different, the assemblies are deemed as 'maybe compatible'. If only the fourth part is different, the assemblies are deemed compatible. However, this is just the default guideline - it is the version policy that decides to what extent these rules are enforced. The version policy can be specified via the application configuration file.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is garbage collection?
Ans : Garbage collection is a system whereby a run-time component takes responsibility for managing the lifetime of objects and the heap memory that they occupy. This concept is not new to .NET - Java and many other languages/runtimes have used garbage collection for some time.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Why doesn't the .NET runtime offer deterministic destruction?
Ans : Because of the garbage collection algorithm. The .NET garbage collector works by periodically running through a list of all the objects that are currently being referenced by an application. All the objects that it doesn't find during this search are ready to be destroyed and the memory reclaimed. The implication of this algorithm is that the runtime doesn't get notified immediately when the final reference on an object goes away - it only finds out during the next sweep of the heap. Futhermore, this type of algorithm works best by performing the garbage collection sweep as rarely as possible. Normally heap exhaustion is the trigger for a collection sweep.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Is the lack of deterministic destruction in .NET a problem?
Ans : It's certainly an issue that affects component design. If you have objects that maintain expensive or scarce resources (e.g. database locks), you need to provide some way for the client to tell the object to release the resource when it is done. Microsoft recommend that you provide a method called Dispose() for this purpose. However, this causes problems for distributed objects - in a distributed system who calls the Dispose() method? Some form of reference-counting or ownership-management mechanism is needed to handle distributed objects - unfortunately the runtime offers no help with this.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is serialization?
Ans : Serialization is the process of converting an object into a stream of bytes. Deserialization is the opposite process of creating an object from a stream of bytes. Serialization / Deserialization is mostly used to transport objects (e.g. during remoting), or to persist objects (e.g. to a file or database).
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Does the .NET Framework have in-built support for serialization?
Ans : There are two separate mechanisms provided by the .NET class library - XmlSerializer and SoapFormatter/BinaryFormatter. Microsoft uses XmlSerializer for Web Services, and uses SoapFormatter/BinaryFormatter for remoting. Both are available for use in your own code.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Can I customise the serialization process?
Ans : Yes. XmlSerializer supports a range of attributes that can be used to configure serialization for a particular class. For example, a field or property can be marked with the [XmlIgnore] attribute to exclude it from serialization. Another example is the [XmlElement] attribute, which can be used to specify the XML element name to be used for a particular property or field. Serialization via SoapFormatter/BinaryFormatter can also be controlled to some extent by attributes. For example, the [NonSerialized] attribute is the equivalent of XmlSerializer's [XmlIgnore] attribute. Ultimate control of the serialization process can be acheived by implementing the the ISerializable interface on the class whose instances are to be serialized.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Why is XmlSerializer so slow?
Ans : There is a once-per-process-per-type overhead with XmlSerializer. So the first time you serialize or deserialize an object of a given type in an application, there is a significant delay. This normally doesn't matter, but it may mean, for example, that XmlSerializer is a poor choice for loading configuration settings during startup of a GUI application.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Why do I get errors when I try to serialize a Hashtable?
Ans : XmlSerializer will refuse to serialize instances of any class that implements IDictionary, e.g. Hashtable. SoapFormatter and BinaryFormatter do not have this restriction.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What are attributes?
Ans : There are at least two types of .NET attribute. The first type I will refer to as a metadata attribute - it allows some data to be attached to a class or method. This data becomes part of the metadata for the class, and (like other class metadata) can be accessed via reflection.The other type of attribute is a context attribute. Context attributes use a similar syntax to metadata attributes but they are fundamentally different. Context attributes provide an interception mechanism whereby instance activation and method calls can be pre- and/or post-processed.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: How does CAS work?
Ans : The CAS security policy revolves around two key concepts - code groups and permissions. Each .NET assembly is a member of a particular code group, and each code group is granted the permissions specified in a named permission set. For example, using the default security policy, a control downloaded from a web site belongs to the 'Zone - Internet' code group, which adheres to the permissions defined by the 'Internet' named permission set. (Naturally the 'Internet' named permission set represents a very restrictive range of permissions.)
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: I can't be bothered with all this CAS stuff. Can I turn it off?
Ans : Yes, as long as you are an administrator. Just run: caspol -s off
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: 35. Can I look at the IL for an assembly?
Ans : Yes. MS supply a tool called Ildasm which can be used to view the metadata and IL for an assembly.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Can source code be reverse-engineered from IL?
Ans : Yes, it is often relatively straightforward to regenerate high-level source (e.g. C#) from IL.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: How can I stop my code being reverse-engineered from IL?
Ans : There is currently no simple way to stop code being reverse-engineered from IL. In future it is likely that IL obfuscation tools will become available, either from MS or from third parties. These tools work by 'optimising' the IL in such a way that reverse-engineering becomes much more difficult. Of course if you are writing web services then reverse-engineering is not a problem as clients do not have access to your IL.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Is there built-in support for tracing/logging?
Ans : Yes, in the System.Diagnostics namespace. There are two main classes that deal with tracing - Debug and Trace. They both work in a similar way - the difference is that tracing from the Debug class only works in builds that have the DEBUG symbol defined, whereas tracing from the Trace class only works in builds that have the TRACE symbol defined. Typically this means that you should use System.Diagnostics.Trace.WriteLine for tracing that you want to work in debug and release builds, and System.Diagnostics.Debug.WriteLine for tracing that you want to work only in debug builds.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Can I redirect tracing to a file?
Ans : Yes. The Debug and Trace classes both have a Listeners property, which is a collection of sinks that receive the tracing that you send via Debug.WriteLine and Trace.WriteLine respectively. By default the Listeners collection contains a single sink, which is an instance of the DefaultTraceListener class. This sends output to the Win32 OutputDebugString() function and also the System.Diagnostics.Debugger.Log() method. This is useful when debugging, but if you're trying to trace a problem at a customer site, redirecting the output to a file is more appropriate. Fortunately, the TextWriterTraceListener class is provided for this purpose.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What are the contents of assembly?
Ans : In general, a static assembly can consist of four elements: The assembly manifest, which contains assembly metadata. Type metadata. Microsoft intermediate language (MSIL) code that implements the types. A set of resources.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is GC (Garbage Collection) and how it works?
Ans : One of the good features of the CLR is Garbage Collection, which runs in the background collecting unused object references, freeing us from having to ensure we always destroy them. In reality the time difference between you releasing the object instance and it being garbage collected is likely to be very small, since the GC is always running. [The process of transitively tracing through all pointers to actively used objects in order to locate all objects that can be referenced, and then arranging to reuse any heap memory that was not found during this trace. The common language runtime garbage collector also compacts the memory that is in use to reduce the working space needed for the heap.] Heap: A portion of memory reserved for a program to use for the temporary storage of data structures whose existence or size cannot be determined until the program is running.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Differnce between Managed code and unmanaged code ?
Ans : Managed Code: Code that runs under a "contract of cooperation" with the common language runtime. Managed code must supply the metadata necessary for the runtime to provide services such as memory management, cross-language integration, code access security, and automatic lifetime control of objects. All code based on Microsoft intermediate language (MSIL) executes as managed code. Un-Managed Code: Code that is created without regard for the conventions and requirements of the common language runtime. Unmanaged code executes in the common language runtime environment with minimal services (for example, no garbage collection, limited debugging, and so on). 
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is Reference type and value type ?
Ans : Reference Type: Reference types are allocated on the managed CLR heap, just like object types. A data type that is stored as a reference to the value's location. The value of a reference type is the location of the sequence of bits that represent the type's data. Reference types can be self-describing types, pointer types, or interface types Value Type: Value types are allocated on the stack just like primitive types in VBScript, VB6 and C/C++. Value types are not instantiated using new go out of scope when the function they are defined within returns. Value types in the CLR are defined as types that derive from system.valueType. A data type that fully describes a value by specifying the sequence of bits that constitutes the value's representation. Type information for a value type instance is not stored with the instance at run time, but it is available in metadata. Value type instances can be treated as objects using boxing.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: 45. What is Boxing and unboxing ?
Ans : Boxing: The conversion of a value type instance to an object, which implies that the instance will carry full type information at run time and will be allocated in the heap. The Microsoft intermediate language (MSIL) instruction set's box instruction converts a value type to an object by making a copy of the value type and embedding it in a newly allocated object. Un-Boxing: The conversion of an object instance to a value type.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is JIT and how is works ?
Ans : An acronym for "just-in-time," a phrase that describes an action that is taken only when it becomes necessary, such as just-in-time compilation or just-in-time object activation
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is portable executable (PE) ?
Ans : The file format used for executable programs and for files to be linked together to form executable programs
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is strong name?
Ans : A name that consists of an assembly's identity”its simple text name, version number, and culture information (if provided)”strengthened by a public key and a digital signature generated over the assembly. Because the assembly manifest contains file hashes for all the files that constitute the assembly implementation, it is sufficient to generate the digital signature over just the one file in the assembly that contains the assembly manifest. Assemblies with the same strong name are expected to be identical
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is global assembly cache?
Ans : A machine-wide code cache that stores assemblies specifically installed to be shared by many applications on the computer. Applications deployed in the global assembly cache must have a strong name.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is difference between constants, readonly and, static ?
Ans : Constants: The value can™t be changed Read-only: The value will be initialized only once from the constructor of the class. Static: Value can be initialized once.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is difference between shared and public?
Ans : An assembly that can be referenced by more than one application. An assembly must be explicitly built to be shared by giving it a cryptographically strong name.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is namespace used for loading assemblies at run time and name the methods?
Ans :  System.Reflection
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What are the types of authentication in .net?
Ans : We have three types of authentication: 1. Form authentication 2. Windows authentication 3. Passport This has to be declared in web.config file.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is the difference between a Struct and a Class ?
Ans : The struct type is suitable for representing lightweight objects such as Point, Rectangle, and Color. Although it is possible to represent a point as a class, a struct is more efficient in some scenarios. For example, if you declare an array of 1000 Point objects, you will allocate additional memory for referencing each object. In this case, the struct is less expensive.When you create a struct object using the new operator, it gets created and the appropriate constructor is called. Unlike classes, structs can be instantiated without using the new operator. If you do not use new, the fields will remain unassigned and the object cannot be used until all of the fields are initialized. It is an error to declare a default (parameterless) constructor for a struct. A default constructor is always provided to initialize the struct members to their default values.It is an error to initialize an instance field in a struct.There is no inheritance for structs as there is for classes. A struct cannot inherit from another struct or class, and it cannot be the base of a class. Structs, however, inherit from the base class Object. A struct can implement interfaces, and it does that exactly as classes do. A struct is a value type, while a class is a reference type.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: How big is the datatype int in .NET?
Ans : 32 bits.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: How big is the char?
Ans : 16 bits (Unicode).
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q:  How do you initiate a string without escaping each backslash?
Ans : Put an @ sign in front of the double-quoted string.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What's the access level of the visibility type internal?
Ans : Current application.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Explain encapsulation ?
Ans : The implementation is hidden, the interface is exposed.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What data type should you use if you want an 8-bit value that's signed? sbyte.
Ans : Speaking of Boolean data types, what's different between C# and C/C++? There's no conversion between 0 and false, as well as any other number and true, like in C/C++.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Where are the value-type variables allocated in the computer RAM? 
Ans : Stack.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q:  Where do the reference-type variables go in the RAM?
Ans : The references go on the stack, while the objects themselves go on the heap. 
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q:  What is the difference between the value-type variables and reference-type variables in terms of garbage collection? 
Ans : The value-type variables are not garbage-collected, they just fall off the stack when they fall out of scope, the reference-type objects are picked up by GC when their references go null.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: How do you convert a string into an integer in .NET?
Ans : Int32.Parse(string)
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: How do you box a primitive data type variable?
Ans : Assign it to the object, pass an object.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Why do you need to box a primitive variable? 
Ans : To pass it by reference. 
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What's the difference between Java and .NET garbage collectors?
Ans :  Sun left the implementation of a specific garbage collector up to the JRE developer, so their performance varies widely, depending on whose JRE you're using. Microsoft standardized on their garbage collection.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: How do you enforce garbage collection in .NET?
Ans : System.GC.Collect();
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What's the difference between const and readonly?
Ans : You can initialize readonly variables to some runtime values. Let's say your program uses current date and time as one of the values that won't change. This way you declare public readonly string DateT = new DateTime().ToString(). What happens when you encounter a continue statement inside the for loop? The code for the rest of the loop is ignored, the control is transferred back to the beginning of the loop. 
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q:  What's the advantage of using System.Text.StringBuilder over System.String?
Ans : StringBuilder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each time it's being operated on, a new instance is created.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Can you store multiple data types in System.Array?
Ans :  No. 
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What's the difference between the System.Array.CopyTo() and System.Array.Clone()?
Ans : The first one performs a deep copy of the array, the second one is shallow.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: How can you sort the elements of the array in descending order?
Ans : By calling Sort() and then Reverse() methods.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What's the .NET datatype that allows the retrieval of data by a unique key?
Ans : HashTable.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What's class SortedList underneath?
Ans : A sorted HashTable.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Will finally block get executed if the exception had not occurred?
Ans : Yes.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Can multiple catch blocks be executed?
Ans : No, once the proper catch code fires off, the control is transferred to the finally block (if there are any), and then whatever follows the finally block.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Why is it a bad idea to throw your own exceptions?
Ans : Well, if at that point you know that an error has occurred, then why not write the proper code to handle that error instead of passing a new Exception object to the catch block? Throwing your own exceptions signifies some design flaws in the project.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What's a delegate?
Ans : A delegate object encapsulates a reference to a method. In C++ they were referred to as function pointers.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What's a multicast delegate?
Ans : It's a delegate that points to and eventually fires off several methods.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: How's the DLL Hell problem solved in .NET?
Ans : Assembly versioning allows the application to specify not only the library it needs to run (which was available under Win32), but also the version of the assembly.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What are the ways to deploy an assembly?
Ans : An MSI installer, a CAB archive, and XCOPY command.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What's a satellite assembly?
Ans : When you write a multilingual or multi-cultural application in .NET, and want to distribute the core application separately from the localized modules, the localized assemblies that modify the core application are called satellite assemblies.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What namespaces are necessary to create a localized application?
Ans : System.Globalization, System.Resources.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: . What does assert() do?
Ans : In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false. The program proceeds without any interruption if the condition is true.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What's the difference between the Debug class and Trace class?
Ans : Documentation looks the same. Use Debug class for debug builds, use Trace class for both debug and release builds.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Why are there five tracing levels in System.Diagnostics.TraceSwitcher?
Ans : The tracing dumps can be quite verbose and for some applications that are constantly running you 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.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Where is the output of TextWriterTraceListener redirected?
Ans : To the Console or a text file depending on the parameter passed to the constructor.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What namespaces are necessary to create a localized application?
Ans : System.Globalization, System.Resources.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What are three test cases you should go through in unit testing?
Ans : Positive test cases (correct data, correct output), negative test cases (broken or missing data, proper handling), exception test cases (exceptions are thrown and caught properly).
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Can you change the value of a variable while debugging a C# application?
Ans : Yes, if you are debugging via Visual Studio.NET, just go to Immediate window.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What's the implicit name of the parameter that gets passed into the class' set method?
Ans : Value, and it's datatype depends on whatever variable we're changing.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: How do you inherit from a class in C#?
Ans : Place a colon and then the name of the base class. Notice that it's double colon in C++. Does C# support multiple inheritance? No, use interfaces instead.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: When you inherit a protected class-level variable, who is it available to?
Ans : Derived Classes.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What's the top .NET class that everything is derived from?
Ans : System.Object.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: How's method overriding different from overloading?
Ans : When overriding, you change the method behavior for a derived class. Overloading simply involves having a method with the same name within the class.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What does the keyword virtual mean in the method definition?
Ans : The method can be over-ridden.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Can you declare the override method static while the original method is non-static?
Ans : No, you can't, the signature of the virtual method must remain the same, only the keyword virtual is changed to keyword override.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: 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.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Can you prevent your class from being inherited and becoming a base class for some other classes?
Ans : Yes, that's what keyword sealed in the class definition is for. The developer trying to derive from your class will get a message: cannot inherit from Sealed class WhateverBaseClassName. It's the same concept as final class in Java.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Can you allow class to be inherited, but prevent the method from being over-ridden?
Ans : Yes, just leave the class public and make the method sealed.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Why can't you specify the accessibility modifier for methods inside the interface?
Ans : They all must be public. Therefore, to prevent you from getting the false impression that you have any freedom of choice, you are not allowed to specify any accessibility, it's public by default.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Can you inherit multiple interfaces?
Ans : Yes, why not.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: And if they have conflicting method names?
Ans : It's up to you to implement the method inside your own class, so implementation is left entirely up to you. This might cause a problem on a higher-level scale if similarly named methods from different interfaces expect different data, but as far as compiler cares you're okay.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What's the difference between an interface and abstract class?
Ans : In the interface all methods must be abstract, in the abstract class some methods can be concrete. In the interface no accessibility modifiers are allowed, which is ok in abstract classes.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: How can you overload a method?
Ans : Different parameter data types, different number of parameters, different order of parameters.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: If a base class has a bunch of overloaded constructors, and an inherited class has another bunch of overloaded constructors, can you enforce a call from an inherited constructor to an arbitrary base constructor? 
Ans : Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What's the difference between System.String and System.StringBuilder classes?
Ans : System.String is immutable, System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Does C# support multiple-inheritance?
Ans : No, use interfaces instead.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: When you inherit a protected class-level variable, who is it available to?
Ans : The derived class. Are private class-level variables inherited? Yes, but they are not accessible. Although they are not visible or accessible via the class interface, they are inherited.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Describe the accessibility modifier "protected internal".
Ans : It is available to derived classes and classes within the same Assembly (and naturally from the base class it's declared in).
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What's the top .NET class that everything is derived from? 
Ans : System.Object.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What's the advantage of using System.Text.StringBuilder over System.String?
Ans : StringBuilder is more efficient in cases where there is a large amount of string manipulation. Strings are immutable, so each time it's being operated on, a new instance is created.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Can you store multiple data types in System.Array?
Ans : No. What's the .NET class that allows the retrieval of a data element using a unique key?
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: HashTable. . Will the finally block get executed if an exception has not occurred?
Ans : Yes.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What's an abstract class?
Ans : A class that cannot be instantiated. An abstract class is a class that must be inherited and have the methods overridden. An abstract class is essentially a blueprint for a class without any implementation.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: When do you absolutely have to declare a class as abstract?
Ans : 1. When at least one of the methods in the class is abstract. 2. When the class itself is inherited from an abstract class, but not all base abstract methods have been overridden.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What's an interface?
Ans : It's an abstract class with public abstract methods all of which must be implemented in the inherited classes.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Why can't you specify the accessibility modifier for methods inside the interface?
Ans : They all must be public. Therefore, to prevent you from getting the false impression that you have any freedom of choice, you are not allowed to specify any accessibility, it's public by default.  
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What's the difference between an interface and abstract class?
Ans : In an interface class, all methods must be abstract. In an abstract class some methods can be concrete. In an interface class, no accessibility modifiers are allowed, which is ok in an abstract class.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: How is method overriding different from method overloading?
Ans : When overriding a method, you change the behavior of the method for the derived class. Overloading a method simply involves having another method with the same name within the class.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Can you declare an override method to be static if the original method is non-static?
Ans : No. The signature of the virtual method must remain the same, only the keyword virtual is changed to keyword override.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Can you override private virtual methods?
Ans : No. Private methods are not accessible outside the class. 
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Can you write a class without specifying namespace? Which namespace does it belong to by default?
Ans : Yes, you can, then the class belongs to global namespace which has no name. For commercial products, naturally, you wouldn't want global namespace.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What are the Main Features of .NET platform?
Ans : Features of .NET Platform are :-  Common Language Runtime Explains the features and benefits of the common language runtime, a run-time environment that manages the execution of code and provides services that simplify the development process. Assemblies Defines the concept of assemblies, which are collections of types and resources that form logical units of functionality. Assemblies are the fundamental units of deployment, version control, reuse, activation scoping, and security permissions. Application Domains Explains how to use application domains to provide isolation between applications. Runtime Hosts Describes the runtime hosts supported by the .NET Framework, including ASP.NET, Internet Explorer, and shell executables. Common Type System Identifies the types supported by the common language runtime. Metadata and Self-Describing Components Explains how the .NET Framework simplifies component interoperation by allowing compilers to emit additional declarative information, or metadata, into all modules and assemblies. Cross-Language Interoperability Explains how managed objects created in different programming languages can interact with one another. .NET Framework Security Describes mechanisms for protecting resources and code from unauthorized code and unauthorized users. .NET Framework Class Library Introduces the library of types provided by the .NET Framework, which expedites and optimizes the development process and gives you access to system functionality. 
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is the use of JIT ?
Ans : JIT (Just - In - Time) is a compiler which converts MSIL code to Native Code (ie.. CPU-specific code that runs on the same computer architecture). Because the common language runtime supplies a JIT compiler for each supported CPU architecture, developers can write a set of MSIL that can be JIT-compiled and run on computers with different architectures. However, your managed code will run only on a specific operating system if it calls platform-specific native APIs, or a platform-specific class library. JIT compilation takes into account the fact that some code might never get called during execution. Rather than using time and memory to convert all the MSIL in a portable executable (PE) file to native code, it converts the MSIL as needed during execution and stores the resulting native code so that it is accessible for subsequent calls. The loader creates and attaches a stub to each of a type's methods when the type is loaded. On the initial call to the method, the stub passes control to the JIT compiler, which converts the MSIL for that method into native code and modifies the stub to direct execution to the location of the native code. Subsequent calls of the JIT-compiled method proceed directly to the native code that was previously generated, reducing the time it takes to JIT-compile and run the code. 
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q:  What meant of assembly & global assembly cache (gac) & Meta data.
Ans : Assembly :-- An assembly is the primary building block of a .NET based application. It is a collection of functionality that is built, versioned, and deployed as a single implementation unit (as one or more files). All managed types and resources are marked either as accessible only within their implementation unit, or as accessible by code outside that unit. It overcomes the problem of 'dll Hell'.The .NET Framework uses assemblies as the fundamental unit for several purposes: · Security · Type Identity · Reference Scope · Versioning · Deployment Global Assembly Cache :-- Assemblies can be shared among multiple applications on the machine by registering them in global Assembly cache(GAC). GAC is a machine wide a local cache of assemblies maintained by the .NET Framework. We can register the assembly to global assembly cache by using gacutil command. We can Navigate to the GAC directory, C:\winnt\Assembly in explore. In the tools menu select the cache properties; in the windows displayed you can set the memory limit in MB used by the GAC MetaData :--Assemblies have Manifests. This Manifest contains Metadata information of the Module/Assembly as well as it contains detailed Metadata of other assemblies/modules references (exported). It's the Assembly Manifest which differentiates between an Assembly and a Module. 
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What are the mobile devices supported by .net platform
Ans : The Microsoft .NET Compact Framework is designed to run on mobile devices such as mobile phones, Personal Digital Assistants (PDAs), and embedded devices. The easiest way to develop and test a Smart Device Application is to use an emulator. These devices are divided into two main divisions: 1) Those that are directly supported by .NET (Pocket PCs, i-Mode phones, and WAP devices) 2) Those that are not (Palm OS and J2ME-powered devices).
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is GUID , why we use it and where?
Ans : GUID :-- GUID is Short form of Globally Unique Identifier, a unique 128-bit number that is produced by the Windows OS or by some Windows applications to identify a particular component, application, file, database entry, and/or user. For instance, a Web site may generate a GUID and assign it to a user's browser to record and track the session. A GUID is also used in a Windows registry to identify COM DLLs. Knowing where to look in the registry and having the correct GUID yields a lot information about a COM object (i.e., information in the type library, its physical location, etc.). Windows also identifies user accounts by a username (computer/domain and username) and assigns it a GUID. Some database administrators even will use GUIDs as primary key values in databases. GUIDs can be created in a number of ways, but usually they are a combination of a few unique settings based on specific point in time (e.g., an IP address, network MAC address, clock date/time, etc.).  Describe the difference between inline and code behind - which is best in a loosely coupled solution  ASP.NET supports two modes of page development: Page logic code that is written inside runat="server"> blocks within an .aspx file and dynamically compiled the first time the page is requested on the server. Page logic code that is written within an external class that is compiled prior to deployment on a server and linked ""behind"" the .aspx file at run time.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q:  What is MSIL? and why should my developers need an appreciation of it if at all?
Ans : 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.  How many .NET languages can a single .NET DLL contain?
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: One  What type of code (server or client) is found in a Code-Behind class?
Ans : server
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: Whats an assembly? 
Ans : Assemblies are the building blocks of .NET Framework applications; they form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. An assembly provides the common language runtime with the information it needs to be aware of type implementations. To the runtime, a type does not exist outside the context of an assembly. 141.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: How many classes can a single .NET DLL contain?
Ans : Unlimited.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q:  What is the difference between string and String ?
Ans : No difference
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is manifest?
Ans : It is the metadata that describes the assemblies.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is metadata?
Ans : Metadata is machine-readable information about a resource, or ""data about data."" Such information might include details on content, format, size, or other characteristics of a data source. In .NET, metadata includes type definitions, version information, external assembly references, and other standardized information.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What are the types of assemblies?
Ans : There are four types of assemblies in .NET: Static assemblies These are the .NET PE files that you create at compile time. Dynamic assemblies These are PE-formatted, in-memory assemblies that you dynamically create at runtime using the classes in the System.Reflection.Emit namespace. Private assemblies These are static assemblies used by a specific application. Public or shared assemblies These are static assemblies that must have a unique shared name and can be used by any application. An application uses a private assembly by referring to the assembly using a static path or through an XML-based application configuration file. While the CLR doesn't enforce versioning policies-checking whether the correct version is used-for private assemblies, it ensures that an application uses the correct shared assemblies with which the application was built. Thus, an application uses a specific shared assembly by referring to the specific shared assembly, and the CLR ensures that the correct version is loaded at runtime. In .NET, an assembly is the smallest unit to which you can associate a version number; 
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q:  What are delegates?where are they used ?
Ans : A delegate defines a reference type that can be used to encapsulate a method with a specific signature. A delegate instance encapsulates a static or an instance method. Delegates are roughly similar to function pointers in C++; however, delegates are type-safe and secure.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q:  When do you use virutal keyword?.
Ans : When we need to override a method of the base class in the sub class, then we give the virtual keyword in the base class method. This makes the method in the base class to be overridable. Methods, properties, and indexers can be virtual, which means that their implementation can be overridden in derived classes. 
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q:  What are class access modifiers ?
Ans : Access modifiers are keywords used to specify the declared accessibility of a member or a type. This section introduces the four access modifiers: · Public - Access is not restricted. · Protected - Access is limited to the containing class or types derived from the containing class. · Internal - Access is limited to the current assembly. · Protected inertnal - Access is limited to the current assembly or types derived · from the containing class. · Private - Access is limited to the containing type.  
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q:  What Is Boxing And Unboxing?
Ans : Boxing :- Boxing is an implicit conversion of a value type to the type object type Eg:- Consider the following declaration of a value-type variable: int i = 123; object o = (object) i; Boxing Conversion UnBoxing :- Unboxing is an explicit conversion from the type object to a value type Eg: int i = 123; // A value type object box = i; // Boxing int j = (int)box; // Unboxing 
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is Value type and refernce type in .Net?.
Ans : Value Type : A variable of a value type always contains a value of that type. The assignment to a variable of a value type creates a copy of the assigned value, while the assignment to a variable of a reference type creates a copy of the reference but not of the referenced object. The value types consist of two main categories: * Stuct Type * Enumeration Type Reference Type :Variables of reference types, referred to as objects, store references to the actual data. This section introduces the following keywords used to declare reference types: * Class * Interface * Delegate This section also introduces the following built-in reference types: * object * string 
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is the difference between structures and enumeration?.
Ans : Unlike classes, structs are value types and do not require heap allocation. A variable of a struct type directly contains the data of the struct, whereas a variable of a class type contains a reference to the data. They are derived from System.ValueType class. Enum->An enum type is a distinct type that declares a set of named constants.They are strongly typed constants. They are unique types that allow to declare symbolic names to integral values. Enums are value types, which means they contain their own value, can't inherit or be inherited from and assignment copies the value of one enum to another. public enum Grade { A, B, C }
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q:  What is namespaces?.
Ans : Namespace is a logical naming scheme for group related types.Some class types that logically belong together they can be put into a common namespace. They prevent namespace collisions and they provide scoping. They are imported as "using" in C# or "Imports" in Visual Basic. It seems as if these directives specify a particular assembly, but they don't. A namespace can span multiple assemblies, and an assembly can define multiple namespaces. When the compiler needs the definition for a class type, it tracks through each of the different imported namespaces to the type name and searches each referenced assembly until it is found. Namespaces can be nested. This is very similar to packages in Java as far as scoping is concerned.
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: How do you create shared assemblies?.
Ans : Just look through the definition of Assemblies.. * An Assembly is a logical unit of code * Assembly physically exist as DLLs or EXEs * One assembly can contain one or more files * The constituent files can include any file types like image files, text files etc. along with DLLs or EXEs * When you compile your source code by default the exe/dll generated is actually an assembly * Unless your code is bundled as assembly it can not be used in any other application * When you talk about version of a component you are actually talking about version of the assembly to which the component belongs. * Every assembly file contains information about itself. This information is called as Assembly Manifest. Following steps are involved in creating shared assemblies : * Create your DLL/EXE source code * Generate unique assembly name using SN utility * Sign your DLL/EXE with the private key by modifying AssemblyInfo file * Compile your DLL/EXE * Place the resultant DLL/EXE in global assembly cache using AL utility
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q:  What is global assembly cache?
Ans :  Each computer where the common language runtime is installed has a machine-wide code cache called the global assembly cache. The global assembly cache stores assemblies specifically designated to be shared by several applications on the computer. There are several ways to deploy an assembly into the global assembly cache: · Use an installer designed to work with the global assembly cache. This is the preferred option for installing assemblies into the global assembly cache. · Use a developer tool called the Global Assembly Cache tool (Gacutil.exe), provided by the .NET Framework SDK. · Use Windows Explorer to drag assemblies into the cache. 
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com

Q: What is MSIL?.
Ans :  When compiling to managed code, the compiler translates your source code into Microsoft intermediate language (MSIL), which is a CPU-independent set of instructions that can be efficiently converted to native code. MSIL includes instructions for loading, storing, initializing, and calling methods on objects, as well as instructions for arithmetic and logical operations, control flow, direct memory access, exception handling, and other operations. Before code can be run, MSIL must be converted to CPU-specific code, usually by a just-in-time (JIT) compiler. Because the common language runtime supplies one or more JIT compilers for each computer architecture it supports, the same set of MSIL can be JIT-compiled and run on any supported architecture. When a compiler produces MSIL, it also produces metadata. Metadata describes the types in your code, including the definition of each type, the signatures of each type's members, the members that your code references, and other data that the runtime uses at execution time. The MSIL and metadata are contained in a portable executable (PE) file that is based on and extends the published Microsoft PE and common object file format (COFF) used historically for executable content. This file format, which accommodates MSIL or native code as well as metadata, enables the operating system to recognize common language runtime images. The presence of metadata in the file along with the MSIL enables your code to describe itself, which means that there is no need for type libraries or Interface Definition Language (IDL). The runtime locates and extracts the metadata from the file as needed during execution. 
Date submitted :8/8/2009 1:03:38 AM
Submitted by : shabir@myfaithsolution.com