← C# tutorial

C#

Introduction to C#

C# (pronounced "C sharp") is a statically-typed, class-based language built for the .NET platform, used for everything from web backends to desktop apps to Unity games, the same broad reach Java has, built by a different company with its own ecosystem.

Example: a minimal C# program

using System;

class Program {
    static void Main() {
        Console.WriteLine("Hello, world!");
    }
}
Hello, world!

Notice the structural similarity to Java: a class wrapping a Main method, Console.WriteLine playing the same role as Java's System.out.println. If you've already read the Java tutorial, C#'s syntax should feel immediately recognizable, both languages share deep roots in the same C-family tradition.

Example
using System;

class Program {
    static void Main() {
        Console.WriteLine("Hello, world!");
    }
}
Output
Hello, world!
Ready to go further?

These free tutorials are a preview of what a Code Secure Academy cohort covers, project work and all.

Explore our tracks

Cookie preferences

Choose what you're comfortable with. You can change this any time from the footer.

Don't miss out

Ready to build something real?

Create a free account to enroll in a track, and get notified the moment a cohort opens.

Create free account