1. Technology

C# For Beginners - Learn about C#

What is C#?


Busy day
René Mansi/E+/Getty Images
C# is a general purpose programming object oriented language invented around 1999 or 2000 by Anders Hejlsberg at Microsoft. It is very similar to Java in its syntax with a major difference being that all variable types are descended from a common ancestor class.

The purpose of C# is to precisely define a series of operations that a computer can perform to accomplish a task. Most of these operations involve manipulating numbers and text, but anything that the computer can physically do can be programmed in C#. Computers have no intelligence- they have to be told exactly what to do and this is defined by the programming language you use. Once programmed they can repeat the steps as many times as you wish at very high speed. Modern PCs are so fast they can count to a billion in a second or two.

What Can a C# Program Do?

Typical programming tasks includes putting data into a database or pulling it out, displaying high speed graphics in a game or video, controlling electronic devices attached to the PC or even playing music and/or sound effects. You can even write software to generate music or help you compose.

Some developers believe that C# is too slow for games, because it is interpreted. However the .NET runtime compiles the interpreted code (called CIL) the first time it is run.

Is C# The Best Programming Language?

Some computer languages were written for a specific purpose.

But C# is a general purpose language with features to make programs more robust. Compared with C++, it doesn't need pointers.

Unlike C++ and to a lesser extent Java, the screen handling in C# is excellent, on both desktops and the web. In this role it is taking over from languages like

You can find out more about the other programming languages and how they compare.

Which Computers Can Run C#?

Any that can run the

How Do I Get Started With C#?

First you need a C# compiler. There are a number of commercial and free ones available. The list below has instructions for downloading and installing two free compilers. Both are completely free and include an IDE to make life easier for you to edit, compile and debug your applications. The instructions also show you how to enter and compile your first C# application.

How Do I Begin Writing C# Applications?

C# is written using a text editor. This can be notepad or an IDE like those supplied with the two compilers listed above. You write a computer program as a series of instructions (called statements) in a notation that looks a little like mathematical formulas.
 int c=0;
 float b= c*3.4+10; 
This is saved out in a text file and then compiled and linked to generate machine code which you then can run. Every application you use on a computer will have been written and compiled like this, many of them in C#. You can't usually get hold of the original source code unless it is open source.

Is There Plenty Of C# Open Source?

Not as much as in Java, C or C++ but it is starting to become popular. Unlike commercial applications, where the source code is owned by a business and never made available, open source code can be viewed and used by anyone. It's an excellent way to learn coding techniques.

Could I Get A Programming Job?

Certainly. There are an increasing number of C# jobs out there and it has the backing of Microsoft so is likely to be around for a considerable length of time. The top three most popular programming languages according to the quarterly Tiobe.com survey, are Java, C and C#.

You could write your own games but you'll need to be artistic or need an artist friend as you'll also need music and sound effects. Perhaps you'd prefer to get a career as a business software developer creating business applications or a software engineer writing software to control nuclear reactors, aircraft, space rockets or for other safety critical areas.

What Tools And Utilities Are There?

Well if you can't find what you want, you could always write it. That is how most of the tools around came into existence.

Where Do I Go Now?

First you have to learn to program in C#. But most of all have fun!
Related Video
PowerPoint Presentations for Beginners
Live Trace in Illustrator
  1. About.com
  2. Technology
  3. C / C++ / C#
  4. C# / C Sharp
  5. Learn C Sharp
  6. C# for Beginners - Learn How to Get Started

©2014 About.com. All rights reserved.