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

Programming Inc Sharp

Ratings: (0)|Views: 138|Likes:
Published by gurudatha265

More info:

Published by: gurudatha265 on Dec 19, 2008
Copyright:Attribution Non-commercial

Availability:

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

07/19/2010

pdf

text

original

 
About Microsoft. NET
 
Microsoft. NET
is one of the latest and new technologies introduced by Microsoft Corporation. Nowadays we use to connect to theinternet using a computer and remote computer responses via a web page and a collection of web pages are called as Web Sites. TheConcept in .NET is that these websites canintegrate with other sites and services using Standard Protocols like HTTP.Microsoft .NET Platform
comprises of four core components
such as .NET Building Block Services such as file storage, calendar calledPassport. NET .NET Device Software which will run on latest Internet Devices like Mobile Phones. .NET user experience such asintegrating this technology to user created documents (integrates with XML). For example if you code XML via a .NET Language likeC#, it will automatically create XML document .NET infrastructure which includes .NET Framework (Common Language Runtime &.NET Framework Class Libraries) Microsoft Visual Studio.NET such as Visual Basic.NET ,Visual C++.NET etc .NET EnterpriseServers and Microsoft Windows.NET. We can build robust, scalable, distributed applications with the help of .NET and the part that helpsus to develop these applications is called the
.NET Framework.
The .NET Framework contains Common Language Runtime (CLR) andthe .NET Framework class libraries also called as Base Class Libraries.All the .NET languages (like C-sharp, VisualBasic.NET, Visual C++. NET etc) have the .NET Framework class libraries built into them.The .NET class Libraries also supports File I/O, database operations, XML (Extensible Markup Language) and SOAP (Simple ObjectAccess Protocol). For example you can develop XML Pages by using C-sharp language.When someone talks about .NET development, then you should understand that they are talking about .NET Framework. It includes aRuntime environment and a set of Class Libraries which is being used by a new language called
C-sharp
abbreviated as C# (more or lesssimilar to C/C++/Java family of languages) and all other .NET Languages. Simply speaking C-sharp is a new language for developingcustom solutions for Microsoft's .NET Platform.The runtime which we discussed just now is also used by
VisualStudio.NET
. Visual Studio.NET provides us with a visual environment todesign and develop .NET Applications. Every language in VisualStudio.NET uses this runtime to execute its applications. Moreover theselanguages compile its source code into an
intermediate language
upon compilation. Hence you can very well use a module written usingC-sharp in a Visual Basic Application. For example you can design a user interface with Visual Basic.NET and write a DLL function usingC-sharp.
.NET Framework ProcessTerms Associated with Microsoft .NETCommon Language Runtime
 Common Language Runtime also called CLR Provides a universal execution engine for developers code. It generates SOAP whenit makes remote procedure calls. CLR is independent and is provided as part of the .NET Framework. The main features of CLR areas follows(1)
 
Managed Code(2)
 
Automatic application installation(3)
 
Memory Management(4)
 
Automatic Garbage Collection(5)
 
Very high level of Security while executing
 
.NET Framework Class Libraries
 These class libraries works with any language under the common language runtime environment. It includes Visual Studio.NET, C-Sharp. Therefore if you are familiar with one .NET language then you can easily migrate to other .NET Languages. The figuregiven below shows the .NET Framework hierarchyNote: -1. All namespaces should have to be called in your Program by applying the keyword
using
. For example if your programs need tocall System namespace, then it should be applied in the program as
using System
.2. Classes cannot be called along with the using directive.3. The using directive applies only to namespaces, just like importing packages in Java. Hence the following code will result incompilation error,
using System.Console.
 However you can create an alias like the following
using mysys = System.Console.
Then you have to apply the alias in yourprogram as follows
mysys.writeLine("Hello C#");
 
Common Language Specification (CLS)
 It is a set of rules that a language compiler must adhere to in order to create .NET Applications that run in the CLR. If you aregoing to create a compiler for .NET, you have to adhere to the rules enumerated in the common language specification and thisenables us to create a club of CLS compliant languages.Each such compiler will have the following features (a) Complete access to .NET Framework hierarchy (b) High level of interoperability with other compliant languages like Visual Basic. NET etc. For example a Visual Basic class can inherit from a C#ClassYou should note that the syntaxes and other programming structures differ from each of these languages. The only difference is thata developer well versed with a language such as C-sharp can easily program in Visual Basic.NET or Visual C++.NET withoutinvesting a lot or spending too long to learn a new language.
Part 2: Begin C-Sharp Programming
 
Getting Started with C-sharp
First of all let me welcome you to the world of this new programming language. I hope you will have a basic idea about Object OrientedProgramming languages because many languages like Java, C++ have come by the past 5 years. However there will be no difficulty inlearning this language if you are a fresher, because this tutorial and the coming ones will explain all the concepts and features right fromthe beginning.Wherever required I explained the features involved in C-sharp by comparing them with Java. This will ensure smooth progress forexperienced Programmers. I recommend you to install the appropriate software's outlined in the next section before learning this newlanguage.
Basic Requirements needed to begin C-sharp Programming
 
1. .NET Framework Software Development Kit and2. An Editor (like Notepad or DOS Editor) to write source codes.Optional Requirements: -1.
 
Visual C#. NET or2.
 
Visual C++ 6.0 included with VisualStudio 6.0
Installing .NET Framework SDK
As a first step you should install .NET SDK on your computer to begin C-sharp Programming. It can be downloaded from the Microsoft'sWebsite. It is also available with almost all the popular computing magazine CD'S. It also comes with the complete documentation in theform of HTML Help.At the time of this writing only beta version of the kit is available. This kit enables you to compile & execute the source code in C#, VisualBasic by using its built-in Command line Compiler (csc and vbc) and runtime Just In Time (JIT) Compiler. This is similar to JavaCompiler (javac) and Java Interpreter (java) included with Java Development Kit.You can also develop applications with C-sharp and Visual Basic by using Visual Studio.NET languages like Visual C#.NET and VisualBasic.NET. This will help you to develop windows based applications easily and with limited effort because you don't have to devote toomuch time in designing the user interface (Usage of WinForms). The only work left for you to do is to write the codings appropriately asper the .NET Standards.
About the Editors
 Notepad 
is the best choice among developers using .NET SDK to develop C# applications. However it is not the most suitable editor sinceit does not support syntax coloring, code numberings etc.Developers can use
Visual C++ 6.0
included with Visual Studio 6.0. However they should make some tweaking in the registry beforeusing the same. It supports syntax colorings and other features such as finding line numbers (Ctrl+G). However it is dangerous for a newuser to make changes in registry. Hence only advanced and experienced users can be able to use Visual Studio 6.0 for developing C#. It isnot possible to compile and execute the applications from the Visual C++ 6.0 Environment. Hence there is not much use except some of the features listed above.
VisualStudio.NET 
provides all the integrated tools and wizards for creating C# and Visual Basic applications. It also supports featuressuch as intellisense, Dynamic help. Moreover you can compile and execute your applications from the IDE itself. Hence in order toexperience the power of developing the .NET applications, you should try VisualStudio.NET.Many
Third Party
editors are now available either from magazine's CD'S or can be downloaded from the internet. However it is up to youto decide upon which editor to use. I recommend you to try one common editor and learn the language in full.
3: Your First Hello C# Program
 
Getting Started with Hello C-Sharp
 After understanding the fundamentals of .NET and its Structure, let us now move on to look at a classic Hello C# Program. As I mentionedin the previous tutorial, you can use any text editor as per your Convenience.Listing 3.1 gives the coding for this simple Hello C# Program.
Using System ;Class Hello {Public static void Main () {Console.writeLine ("Hello C#");

Activity (6)

You've already reviewed this. Edit your review.
1 hundred reads
A Alagu Ganesh liked this
A Alagu Ganesh liked this
jobishct liked this
sapguruhull liked this
a_tharwat liked this

You're Reading a Free Preview

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