Website development and design blog, tutorials and inspiration

What is C#?

Just what is this See Sharp anyway?

By , 20th May 2007 in C#

C# (pronounced "see sharp") is a modern, general-purpose, object-oriented programming language developed by Microsoft within the .NET initiative. C# has been approved as a standard by Ecma (ECMA-334) and ISO (ISO/IEC 23270).
 

C# is a strongly typed language meaning that every variable must be declared with a data type and initialized prior to use. Once a variable has been defined, it cannot be redefined within its scope. For example, if you define a variable to hold a number, you cannot make it hold text later on. We will cover variables and data types shortly.

C# is an extension of C++ and while it retails a similar syntax and layout, it is also vastly different. C# takes the best parts of several programming languages and merges them together. It also adds a host of new features to make C# one of the most powerful languages around at the moment.

C# is a managed language which means that it is not compiled directly into machine code, but rather into an intermediate language which is executed within the common language runtime. We'll see more about this later.

What this means for new programmers

C# is easier to learn and work with for somebody new to programming. The language, Visual Studio and the .Net platform makes it more difficult to make critical errors such as memory leaks and null references. C# syntax is much easier to understand than similar C++ which means that non-programmers can pick it up easier.

What this means for existing programmers

If you are migrating from Delphi/Pascal you will see some obvious similarity between the languages and it should be fairly similar from the start. It was for me. If you are migrating from C++ or Java, again it should be familiar. This is because C# is based on C++, Java and Delphi.

One of the most important concepts to understand is that there are no global variables or functions in C#. All methods and members must be declared within classes, however, you can use static members of public classes can substitute for global variables and functions.

In the next tutorial in this series, we will look at the nitty gritty of C# and start doing some programming work.

Comments
  1. Shalu David
    Shalu David

    Just read "What is C#". Already like it! can't wait to move to the next

  2. James
    James

    Very well structured set of tutorials thank you.

    James

Leave a Reply

Your email address will not be published.