A while back I was exposed to C# and .NET through my employer and being the learning guru that I am I decided to learn as much as I could about the topic. I figured it could only help me with my current job and maybe I could do something fun with it on the side. After a long break from blogging, I have decided to start posting more regularly. This post marks the beginning of a multi-post C# introduction and getting started tutorial.
C# pronounced “C Sharp” is a programming language developed by Microsoft as a general purpose language. General purpose meaning that it can be used for a wide variety of solutions such as Windows applications, web applications, and even mobile apps. C# is not as fast regarding performance as other languages such as C++ or assembly nor is it meant to be. Developing C# applications is primarily done in Visual Studio by Microsoft on Windows, but there are ways it can be done on Mac or Linux with Mono.
The .NET framework is developed by Microsoft to run primarily on Windows. It is a framework for running software or rather a code execution environment that is composed of the CLR and FCL. The Common Language Runtime or CLR is what runs all applications that are written for the .NET framework. It does things such as memory management, thread execution, code execution, and compilation. The Framework Class Library or FCL is simply a collection of libraries that can be called when developing .NET applications.
As stated above C# is a general purpose programming language that can be used to develop many different types of applications. Some of these kinds of applications are:
Note: The above examples are just for helping with understanding. It does not mean that Facebook or Internet Explorer was developed with C# although it could certainly be possible.
To get started writing applications using C# you will need to install Visual Studio on Windows. You can download Visual Studio 2015 Community Edition from the Visual Studio Website for free. The Community Edition is fully capable of getting you started with C# without having to purchase the Professional Edition.
If you are on a different operating system, then you will need to check out the Mono Project. This is beyond the scope of this article, but hopefully I will be writing about it very soon due to the fact I am a fan of all operating systems such as Linux or OSX. Also, there was recently a release of .NET Core, which is capable of running on other operating systems other than Windows, but I have not had a chance to check it out. I am super excited to check it out so hopefully I will be writing about that soon.
Once you download and install Visual Studio, you will be able to start developing applications with C#. To get you started, I am going to show you the classic ‘Hello World’ example. Follow the following steps.
static void Main(string args)
Congratulations! You just created your first C# application. This first application is a significant accomplishment, and many more great things are sure to come.
In this article, I told you about what C# is and its relationship to .NET. We also went over the classic “Hello World” example by creating a simple Windows console application that displays “Hello World”. This article is just one of many articles covering C#. If you have any questions or comments, please leave a comment below.
Hi, my name is Jeremy Shanks. I am a Software Engineer in Raleigh, NC. Recently I embarked on the journey of teaching others how to develop projects in C#. Be sure to check them out if you are new to C#.
Please log in again. The login page will open in a new tab. After logging in you can close it and return to this page.