.NET Basics Interview Question Answers

Aired Consulting 10/14/2011 No Comment
What is strong name?
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.

What is managed code and managed data?
We can describe this Manage code like, if a code running under the control CLR, then we can call it as Managed Code.

Managed code is code that is written to target the services of the common language runtime (see what is CLR?). In order to target these services, the code must provide a minimum level of information (metadata) to the runtime. All C# (when not using the unsafe keyword), Visual Basic .NET, J#, and JScript .NET code is managed by default. Visual Studio .NET C++ code is not managed by default, but the compiler can produce managed code by specifying a Command-line switch (/CLR).

Closely related to managed code is managed data—data that is allocated and reallocated by the common language runtime's garbage collector. C#, Visual Basic.NET, J# and JScript .NET data is managed by default. C# data can, however, be marked as unmanaged through the use of special keywords. Visual Studio .NET C++ data is unmanaged by default (even when using the /CLR switch), but when using Managed Extensions for C++, a class can be marked as managed by using the __gc keyword. As the name suggests, this means that the memory for instances of the class is managed by the garbage collector. In addition, the class becomes a full participating member of the .NET Framework community, with all of the benefits and restrictions that brings. An example of a benefit is proper interoperability with classes written in other languages (for example, a managed C++ class can inherit from a Visual Basic.NET class). An example of a restriction is that a managed class can only inherit from one base class. Any restrictions, such as this one, are designed to prevent common programming errors.

What is the Microsoft Intermediate Language (MSIL)?
MSIL is the Machine independent Code into which .NET Framework programs are compiled. It contains instructions for loading, storing, initializing, and calling methods on objects. Combined with metadata and the common type system, MSIL allows for true cross language integration. Prior to execution, MSIL is converted to machine code via CLR’s Just-in-Time (JIT) compiler.

What is the common type system (CTS)?
The common type system (CTS) is a rich type system, built into the common language runtime (CLR) that supports the types and operations found in most of .NET programming languages. The common type system supports the complete implementation of a wide range of programming languages.

What is the common language runtime (CLR)?
The common language runtime (CLR) is major component in the .NET Framework and it is the execution engine for .NET Framework applications.

It is responsible for proving the number of services, including the following:
1. Code management (loading and execution)
2. Verification of type safety
3. Conversion of Microsoft Intermediate Language (MSIL) to native code
4. Access to metadata (enhanced type information)
5. Managing memory for managed objects
6. Enforcement of code access security (See what is code access security?)
7. Exception handling, including cross-language exceptions
8. Interoperation between managed code, COM objects, and pre-existing DLLs (unmanaged code and data)
9. Automation of object layout
10. Support for developer services (profiling, debugging, and so on)

What is GC in NET Framework?
The .NET Framework's garbage collector manages the allocation and release of memory for your application. Each time you use the new operator to create an object, the runtime allocates memory for the object from the managed heap. As long as address space is available in the managed heap, the runtime continues to allocate space for new objects. However, memory is not infinite. Eventually the garbage collector must perform a collection in order to free some memory. The garbage collector's optimizing engine determines the best time to perform a collection, based upon the allocations being made. When the garbage collector performs a collection, it checks for objects in the managed heap that are no longer being used by the application and performs the necessary operations to reclaim their memory.

From the following which datatype is not supported in RangeValidator?

What does the "EnableViewState" property do? Why would I want it on or off?
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 the Global.asax used for?
The Global.asax (including the Global.asax.cs file) is used to implement application and session level events.

What’s the difference between Response.Write() andResponse.Output.Write()?
Response.Output.Write() allows you to write formatted output.

What is the Difference between Web.config and Machine.config?
Scope:
Web.config => For particular application in IIS.
Machine.config = > For All the applications in IIS
Created:
Web.config => Created when you create an application
Machine.config => Create when you install Visual Studio
Known as:
Web.config => is known as Application Level configuration file
Machine.config => is known as Machine level configuration file
Location:
Web.config => In your application Directory
Machine.config => …\Microsoft.NET\Framework\(Version)\ CONFIG

Advantages of Crystal Reports
Advantages of Crystal Reports

Some of the major advantages of using Crystal Reports are:
1. Rapid report development since the designer interface would ease the coding work for the programmer.
2. Can extend it to complicated reports with interactive charts and enhance the understanding of the business model
3. Exposes a report object model, can interact with other controls on the ASP.NET Web form
4. Can programmatically export the reports into widely used formats like .pdf, .doc, .xls, .html and .rtf
Related Posts

No comments:

 

Aired | Copyright © 2009-2014| All Rights Reserved 2014 | Privacy Policy and Disclaimer

Contact Us | About Us