Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1


Ratings: (0)|Views: 4|Likes:
Published by santhosh1212
.net basics
.net basics

More info:

Published by: santhosh1212 on May 29, 2010
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOCX, PDF, TXT or read online from Scribd
See more
See less





Common Language Runtime (CLR)
.NET Framework
a set of classes
that run
on top of an executionenvironment called the CLR
. The CLR enables the following key benefits:
Multilanguage support.
True to its name, the CLR is a runtime- executionenvironment that provides a common set of features across many differentlanguages. Coupled with the .NET Framework classes, developers can writecode in the language of their choice and not have to worry about using a differentframework of classes. This arrangement is especially useful in a mixed-languageenvironment in which some developers are coding in one language, such as C++, and others are coding in a different language, such as Microsoft Visual Basic.For example, you don’t have to learn a different way to open a file just because aproject is better suited to a different programming language.
Code access security.
The CLR provides a means of protecting importantresources on the system such as the hard disk, the network, or the user interface. Code access security in the CLR protects these resources byinspecting code as it’s running and only allowing the code to access a resource if it has permission. Administrators and users can decide what permissions they’rewilling to grant to an application based on information associated with thatapplication called evidence. For example, an application that is downloaded off an Internet site and runs in a browser might be able to communicate only with thehost site from which it came, whereas an application installed on the localmachine and run by a user might be able to send messages to other nodes onthe network. In this example, the network represents the protected resource, andthe location from which the application runs is used to determine the manner inwhich the application can access the network.
Memory management
. Applications written on top of the CLR do not need toexplicitly allocate and free system memory. Handling your own memorymanagement can be complex and time consuming. In fact,
memorymanagement is one of the most common sources of bugs and securityvulnerabilities in today’s applications
. Without having to worry about memorymanagement, developers are able to be more productive, write more robustcode, and focus on solving their own problems.
Managed code
. Managed code is code that executes on top of the CLR. It’scalled managed code because the CLR takes care of, or manages, the code’sexecution, such as requests for system memory and the application of codeaccess security policies.
Why the .NET Framework?
The .NET Framework was designed with one key goal in mind:
to increase theproductivity of software developers
. This goal is accomplished through a number of features that are built into the framework. Understanding these features will help youmaximize your development efforts when using the .NET Framework.
Class-Based Model
APIs in the .NET Framework are encapsulated in classes
. A class in theframework usually
contains members such as properties and methods
. Developerscan
create an instance of a class
in the framework and use it to perform tasks that arerequired by the application. Developers can also
extend classes to include additionalbehaviors or combine them to define new classes
. This object-oriented approachoffers a familiar model that you can quickly identify with and relate to as you explore thefunctionality exposed by the framework.
Layered Architecture
The classes that make up the .NET Framework are layered, meaning that at the base of the framework are
simple types
, which are built on and reused by more
. The more complex types often provide the ability to perform more significantoperations. For example, the socket class provides raw access to the network. Theamount of code that you might write when using the socket class to download a filefrom the Internet might be 50 lines. The HTTP classes in the framework build on top of the socket class and make it easier to perform the same task. For example, theexample that downloads a file from the Internet could now be accomplished in 15 linesof code. More generic URI resolution classes make it possible to download the samefile in one or two lines of code. This layered approach makes it possible to use theclasses that are most applicable to the task your application needs to accomplish.Because one layer builds on top of the other, it also makes it possible for an applicationto use the higher levels to do most of the work without blocking the ability to access thelower levels for maximum control.
.NET Framework Classes
Now that we’ve covered a bit of the motivation behind the framework, let’s take adeeper look at the classes. Classes in the .NET Framework are divided into logicalgroups called namespaces. Most classes in the .NET Framework exist under a top-levelnamespace known as System. The root System namespace contains the basic datatypes in the framework, such as numbers, Booleans, Uniform Resource Identifiers(URI), strings, and objects, the base type from which all other classes in the frameworkderive. System also contains a broad array of second-level namespaces that representthe core functionality in the framework, such as eventing, infrastructure, interfaces,attributes, and exceptions.
System.* Namespaces Overview
There are
two general groups of classes in the .NET Framework
1.General-purpose base class libraries and2.Application model-specific classes.
It’s useful to understand the difference between the two so that you’ll better know whento use classes from each group as you build your application.
General-Purpose Class Libraries
General-purpose class libraries can be useful in almost any context. For example,System.String represents an immutable fixed-length string of Unicode characters. String

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->