Knowledge Base
Home > Learn Programming > Learn C# programming

Learn C# Programming

What is C#?
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.

Java was originally devised to control toasters.
C for Operating Systems Programming.
Pascal to teach good programming techniques.
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
Visual Basic.
Delphi.

Which Computers Can Run C#?
Any that can run the

..NET framework.
On Linux under Project Mono.
DOTGNU project.

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.

Year of Creation?
2000. C# is the main programming language of the Microsoft .NET framework and has had millions of dollars spent developing and promoting it. In under 6 years it has become a rising star and may yet rise to rival Java.

Why was C# Invented?
Because Sun wouldn't allow Microsoft to make changes to Java. Microsoft had had a product Visual J++ but the changes they had made upset Sun and so it came to a halt.

What is C# used for?
All sorts of applications ranging from computer games, utilities, Operating Systems and compilers. There are also web based applications running on the asp.net platform.

What versions of C# are there?
The current version is 2.0 and that came out with Microsoft Visual Studio 2005. Version 3.0 is being developed.

Does C# present any problems for novice Programmers?
C# is a comprehensive language with many advanced features, especially in version 2.0 such as generics. To get the best out of C#, knowledge of Object Oriented Programming is essential. Syntactically it has a lot in common with Java.

How would you sum up C#?
C# is a modern programming language and is really only rivalled by Java. It does though require the .NET framework on Windows. There remains a substantial body of code written in C++ and it seems that C# will coexist with C++ rather than replace it. C# is an ECMA (European Computer Manufacturers Association) and ISO standard and this has allowed other implementations such as the Linux project Mono to happen.