Backend development

Stage 1 · Lesson 3 of 10

C# syntax, classes and records

Your language and how HTTP works

C# is and object-oriented, with many modern shortcuts. Learn , classes with properties, interfaces and . Learn top-level statements too, which let a small program skip the usual class wrapper.

Then learn the features modern code uses everywhere: var, , with switch expressions, and records. A record such as record Order(int Id, decimal Total); is an unchangeable data type. Two records with the same values count as equal, which makes them ideal for request and response bodies.

Know the difference between a class and a struct. A class is a reference type, so copying it copies a pointer. A struct is a value type, so copying it copies the data. Use decimal, not double, for money.

Common trapold tutorials that hand-write fields, getters and setters; modern C# says the same in one line.

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

Resources for this stage

Start with

  • GuideFree
    Learn C#

    Microsoft · Beginner

    Official C# tutorials from the language basics through classes, LINQ and async

Practise

  • Your language track: small exercises with free mentor feedback on idiomatic code

Keep handy

  • Quick syntax lookups for your language when you forget how something is written

  • Read the HTTP overview, methods, headers and status code pages until they feel obvious

Also worth your time

Mark this stage as not done?