C# Overview

Welcome to the C# documentation. C# (pronounced "C-sharp") is a modern, object-oriented, and type-safe programming language developed by Microsoft. It is designed for building a wide range of applications, from desktop and web services to mobile apps and cloud-based solutions.

C# runs on the .NET platform, which provides a comprehensive set of libraries and runtime services. This enables developers to create robust, high-performance applications that are cross-platform compatible.

Key Features of C#

Getting Started with C#

To start your C# journey, you'll need the .NET SDK. You can download it from the official .NET download page.

Here's a simple "Hello, World!" program:

using System;

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

You can compile and run this code using the .NET CLI:

  1. Save the code in a file named Program.cs.
  2. Open a terminal or command prompt in the same directory.
  3. Run the following commands:
    dotnet new console -o MyFirstApp
    cd MyFirstApp
    // Replace the content of Program.cs with the code above
    dotnet run

Learn More

Explore the following sections to deepen your understanding of C#: