C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » ASP.NET/Web Applications »

.NET Runtime


Posted Date: 26 May 2004    Resource Type: Articles    Category: ASP.NET/Web Applications
Author: Mohit BansalMember Level: Bronze    
Rating: 1 out of 5Points: 10



DotNet and CLR

At the heart of the .NET Framework is the Common Language Runtime (CLR). In addition to acting as a virtual machine, interpreting and executing IL code on the fly, the CLR performs numerous other functions, such as type safety checking, application memory isolation, memory management, garbage collection, and crosslanguage exception handling.
The CLR greatly simplifies crosslanguage communication through the introduction of the Common Type System (CTS). The CTS defines all of the basic types that can be used in the .NET Framework and the operations that can be performed on those types. Applications can create more complex types, but they must be built from the types defined by the CTS.

All CTS types are classes that derive from a base class called System. Object (this is true even for “primitive” types such as integer and floating point variables). This means that any object executing inside the CLR can utilize the member functions of the System.Object class.

Consider the following straightforward C# fragment:

int a=5;
int b=5;
if (a==b) {
System.Console.WriteLine("a is the same as b");
}


Since all types inherit from System.Object, the code could be rewritten as:

int a=5;
int b=5;
if (a.Equals(b)) {
System.Console.WriteLine("a is the same as b");
}


COMMON LANGUAGE SPECIFICATION

A subsection of the CTS called the Common Language Specification(CLS) specifies how .NET languages share and extend one another’s libraries.

CODE ACCESS SECURITY

The CLR is also burdened with the responsibility of security. An integral part of the .NET Runtime is something called Code Access Security (CAS), which associates a certain amount of “trust” with code, depending on the code’s origins (the local file system, intranet, Internet, etc.). The CLR is responsible for making sure that the code it executes stays within its designated security boundaries. This could include such things as reading and writing files from the user’s hard drive, making registry entries, and so forth.
You can modify the permissions that are granted to code from a certain location using a utility called CASPOL.EXE.

VB to .NET
To mitigate the effort required to convert existing VB projects, Microsoft has provided the Microsoft.VisualBasic. Compatibility runtime DLL, which allows you to use some intrinsic elements of the Visual Basic language. However, not all intrinsic elements are supported.

Conclusion
The .NET Runtime is a collection of classes that can be uniformly accessed by any language capable of producing IL code. Functionality that was traditionally provided by the language environment is now supplied by the Runtime classes. This greatly simplifies the development process, as one only has to familiarize oneself with a common framework, instead of a language-dependent API. The Runtime classes are organized using namespaces, which makes them easier to access and syntactically more concise.




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Bind The Data with Repeater Conrol
Previous Resource: Building a 3-Tier ASP.NET Application using Notepad
Return to Discussion Resource Index
Post New Resource
Category: ASP.NET/Web Applications


Post resources and earn money!
 
Related Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use