DEV Community

Cover image for Getting started with C# - Hello World!
Jordan Taylor
Jordan Taylor

Posted on • Updated on

Getting started with C# - Hello World!

Hey friends!

If you are like and you realized that C# and the whole .NET ecosystem is fun to work with or you are just getting your feet wet this is fast little series of articles for you to go through to get up and running with C#.

What is C#?

C# is pronounced "C-Sharp".

It is an object-oriented programming language created by Microsoft that runs on the .NET Framework.

C# has roots from the C family, and the language is close to other popular languages like C++ and Java.

The first version was released in year 2000. The latest version, C# 9 that was released in 2020.

C# is used for:

  • Mobile applications.
  • Desktop applications.
  • Web applications.
  • Web services.
  • Web sites.
  • Games.
  • VR.
  • Database applications.

And a whole lot more!

So by now you may be thinking... Why Use C#?

  • It is one of the most popular programming language in the world.
  • It is easy to learn and simple to use.
  • It has a huge community support.
  • C# is an object oriented language which gives a clear structure -to programs and allows code to be reused, lowering development costs.
  • As C# is close to C, C++ and Java, it makes it easy for .
  • programmers to switch to C# or vice versa.

Let's get building!

Microsoft has built this handy tool to try .NET and C# that is vary user friendly or beginner or even if you don't want to mess with IDEs it get straight to coding.

Click me - Try.dot.net

Taking out first steps.

Now that we have our web IDE, let's start coding something simple. We can remove all the default test on Try.dot.net and copy this in there and click run.

using System;

namespace HelloWorld
{
  class Program
  {
    static void Main(string[] args)
    {
      Console.WriteLine("Hello World!");    
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

We can view our results.

image

And there we are running our first lines of code in C#.

In part 2 we will take a look at Storing and retrieving data in C#.

Resources

Like, share and follow me 🔥 for more content:

📽YouTube
Buy me a coffee
💖Patreon
🌐JustJordanT.com
🐱‍💻GitHub
🤠Twitter
🏢LinkedIn

Top comments (0)