A step by step tutorial teaching you how to create your own chat client and chat server easily in C#, for local networks or the Internet.
A C# tutorial showing you how to make use of WMI to extract information on disk drives, such as model, capacity, sectors and serial number.
This tutorial will teach you how to calculate the shipping cost based on the weight, height, length and depth of the box, the distance and the UPS service type.
Creating a Rich Text Editor using JavaScript is easier to do than you might think, thanks to the support of modern browsers; this tutorial will walk you through it.
Introducing C#An introduction to C Sharp and object oriented programming. Superficially covers a few aspects of C Sharp and builds your first C# program, the classic 'Hello World'. |
On Friday, April 2nd 2004 at 02:44 PM By Andrew Pociu (View Profile) ![]() ![]() ![]() ![]() (Rated 4.7 with 25 votes) |
||
Introducing C#C Sharp is part of the next generation of programming languages. The transition from C++ to C# is similar to the transition from C to C++. C++ was an object oriented language, while C Sharp is a fully object oriented language. You will notice this even in your first C# program, 'Hello World'. C Sharp combines the security of Java with the rapid development of VisualBasic and of course with the strenght of C++. Hello World in C#For your first C# program, I suppose you have Microsoft Visual Studio .NET installed on your station. After opening MS Visual Studio .NET, from the File menu choose New Project. Select the 'Visual C# Projects' folder and choose 'Console Application'. In the 'Name' field choose a name for your project, perhaps 'HelloWorld'. Also, in the 'Location' field choose the folder where you want the project files to be stored. After you click 'OK', Visual Studio builds your project named 'HelloWorld'. In the project there is an opened file called Class1.cs and inside the file there is this code:
C# - Object oriented programmingSuppose we have a movie. A movie can have a runtime, a director, a certification, a price... Also, a movie can be of many types, or genres. A comedy, a drama, a documentary. All three of them are movies, but different type of movies. In C#, if we had to include our movie in a program, the movie would be a class. A comedy, drama or documentary are objects of that class. That means a class is composed from objects. We access the objects of that class using:
before the class definition. If you know a bit of C++ programming, you probably remember this from namespaces (and of course 'using namespace std'). By specifing 'using Movie' before the class definition we can now use 'Comedy.Sci-Fi.BackToTheFuture.Play()' inside the class. Back to 'Hello World'Now you should be able to recognize the 'HelloWorld' class inside our little program. It's time to compile our code. Press Ctrl+Shift+B or choose 'Build Solution' from the 'Build' menu and after the build project is complete, press F5 (or the '>' shaped button on the toolbar). If the compile is successful you should be able to see the result, the 'Hello World!' text beeing displayed in a MS-DOS console. |
|||
Digg It!
Del.icio.us
Reddit
StumbleIt
Newsvine
Furl
BlinkList
|
|||
|
|||
Current CommentsGreat work, and thanks very much for introducing me to this.
thank you for the indroduction
Thanks to introduce me.Its good example to learn.
thank you for all
The post is written in very a good manner and it entails many useful information for me. I am happy to find your distinguished way of writing the post.
I found this blog very useful for me. Thanks for your sharing and specially for this great article.
hey buddy,this is one of the best posts that I’ve ever seen; you may include some more ideas in the same theme. I’m still waiting for some interesting thoughts from your side in your next post.
Pleased to visit your site,just good job. Thanks for sharing the wonderful experience.
Related Tutorials
Related Source Code
C# Job Search