C# Get Started

C# Get Started

Welcome to the world of C# (pronounced "C-Sharp")! C# is an object-oriented, modern, and type-safe programming language developed by Microsoft. It is a part of the .NET framework and is widely used for building everything from desktop applications to large-scale web services and games.


Why Learn C#?

If you are considering learning a programming language, C# is one of the best choices you can make. Here is why:


Setting Up Your Environment

To start writing C# code on your own machine, you don't need much. You primarily need an Integrated Development Environment (IDE).

1. Visual Studio

The most popular IDE for C# is Visual Studio (not to be confused with Visual Studio Code). Microsoft provides a free version called Visual Studio Community, which includes everything you need to build and run C# programs.

2. Visual Studio Code (VS Code)

If you prefer a lighter text editor, you can use VS Code. You will need to install the C# Dev Kit extension and the .NET SDK to compile and run your code.


Your First C# Program

Let's take a look at a classic "Hello World" program. Don't worry if you don't understand everything right away; we will break it down in the next lesson.

Hello World in C#

using System;

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

When this code runs, it simply prints Hello World! to the screen.


What's Next?

In the next chapters, we will break down the syntax of C#, understand how to output different types of data, and start building our own logic using variables and operators.


Exercise

?

Which company developed the C# programming language?