Tim TrottTim Trott.ninja { color:black; visibility:hidden; }

What is C#?

By , Sunday 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 initialised 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 make 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.

My website and its content are free to use without the clutter of adverts, tracking cookies, marketing messages or anything else like that. If you enjoyed reading this article, or it helped you in some way, all I ask in return is you leave a comment below or share this page with your friends. Thank you.

About the Author

Tim Trott

Tim is a professional software engineer, designer, photographer and astronomer from the United Kingdom. You can follow him on Twitter to get the latest updates.

Further Reading
2 thoughts on “What is C#?”
  1. Gravatar
    Shalu David

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

  2. Gravatar

    Very well structured set of tutorials thank you.


Leave a Reply

Your email address will not be published.