.NET developer

Stage 1 · Lesson 4 of 7

Types, classes and interfaces

C# and the .NET platform

C# is statically typed: every variable has a type the compiler checks before the program runs. such as int, decimal, DateTime and structs are copied when you assign them. Reference types such as classes are shared: two variables can point at the same object.

Classes hold data and behaviour, and describe a contract, such as IEmailSender, that several classes can implement. Interfaces are everywhere in .NET because hands you an implementation of an interface. Learn properties, constructors, access modifiers and static members, plus decimal for money and DateTimeOffset or UTC for times. such as List<Order> keep collections type-safe.

Common trapusing double for amounts: 0.1 plus 0.2 is not exactly 0.3, and a bank will notice.

A question to check yourself, an AI practice session and 2 cheat sheet entries come with the full roadmap. Unlock

Resources for this stage

Start with· follow one of these

  • GuideFree
    Learn C#

    Microsoft · Beginner

    Free official C# path: syntax, types, classes, collections and exceptions with in-browser exercises

  • GuideFree
    .NET documentation

    Microsoft

    The official .NET docs: start with the CLI overview, project files and the C# language tour

Practise

  • The free C# track: small exercises with mentor feedback that build fluency fast

Keep handy

  • Searchable offline docs, handy for C# and .NET API lookups while you practise

Also worth your time

Mark this stage as not done?