Sharpforge Citadel
Learn C#
The versatile language of .NET — games, web APIs, desktop and cloud. Learn it by writing real C#.
Learn C# online with interactive lessons. Write and run real C# and .NET code in your browser, pass tests, earn XP and beat bosses. First chapter free.
First 8 lessons free · Finish within 30 days after buying and get $10.50 back
Want more than one course?
The All-Access Pass unlocks all 8 courses and every new one we release, for $120 once.
Course map
6 chapters, 34 lessons
- 10/8
Fundamentals
Write your first C# programs and learn the building blocks — variables, types, string interpolation, operators, if/else, switch expressions and loops. Free to play.
- 1C# Hello World: Your First ProgramEasy · 10 XPFree
- 2C# Variables and Data TypesEasy · 10 XPFree
- 3C# Strings and String InterpolationEasy · 10 XPFree
- 4C# Operators: Arithmetic, Comparison and LogicEasy · 10 XPFree
- 5C# if/else, switch and Switch ExpressionsEasy · 10 XPFree
- 6C# Loops: for, while, do-while and foreachMedium · 20 XPFree
- Quiz: C# FundamentalsQuiz · 10 XPFree
Boss: The Ember SentinelHard · 100 XPFree
- 20/4
Methods
Split programs into reusable methods with parameters and return values, overloads, optional and out parameters — then master recursion.
- 30/5
Arrays & Lists
Store many values at once with arrays and List<T>, walk through them with foreach, and look things up instantly with Dictionary<TKey, TValue>.
- 40/6
Classes & Objects
Model your own types with classes, properties and constructors, share state with static members and describe data with immutable records.
- C# Classes and ObjectsMedium · 20 XP
- C# Properties: get, set, init and ValidationMedium · 20 XP
- C# Constructors: Overloading, Chaining and Primary ConstructorsMedium · 20 XP
- C# static Members, const and Static ClassesMedium · 20 XP
- C# Records: Immutable Data with Value EqualityMedium · 20 XP
Boss: The Clockwork QuartermasterHard · 100 XP
- 50/6
Inheritance & Interfaces
Build class hierarchies with virtual and override, define contracts with abstract classes and interfaces, and let polymorphism do the work.
- C# Inheritance: virtual, override and baseMedium · 20 XP
- C# Abstract Classes and Abstract MethodsMedium · 20 XP
- C# Interfaces: Contracts for Your ClassesMedium · 20 XP
- Polymorphism in C#: One Interface, Many FormsMedium · 20 XP
- Quiz: C# Inheritance, Interfaces and PolymorphismQuiz · 10 XP
Boss: Morwen the Mirror WitchHard · 100 XP
- 60/5
LINQ & Errors
Query collections elegantly with LINQ, handle failures with exceptions and custom exception types, and write null-safe code with nullable types.
About this C# course
C# is one of the most useful programming languages you can learn. It powers the .NET platform behind web APIs, cloud services and business software at thousands of companies, it is the scripting language of the Unity game engine, and it runs on Windows, macOS, Linux, phones and even inside the browser. Modern C# is fast, safe and pleasant to write — and it is consistently one of the most loved and best-paid languages in developer surveys.
Learn C# is an interactive C# course for beginners. Every lesson pairs a short, focused explanation with a real coding challenge. You write C# directly in your browser, press Run, and the real Roslyn compiler — the same one Visual Studio uses — compiles your code and runs it on .NET, right inside the page. Hidden tests check your solution instantly and tell you exactly what went wrong. There is nothing to install: no Visual Studio, no .NET SDK, no setup. You can learn C# online on any laptop or Chromebook.
The course takes you from your first Console.WriteLine("Hello, World!") to object-oriented programs and LINQ queries:
- Fundamentals — variables, types, string interpolation, operators,
if/else, switch expressions and loops - Methods — parameters, return values, overloading, optional and
outparameters, and recursion - Arrays & Lists — arrays,
foreach,List<T>andDictionary<TKey, TValue> - Classes & Objects — properties, constructors,
staticmembers and records - Inheritance & Interfaces —
virtual/override, abstract classes, interfaces and polymorphism - LINQ & Errors — LINQ queries, exceptions, custom exceptions and nullable types
Codewilds turns learning into a game. The Sharpforge Citadel is your realm: every lesson earns XP, daily practice builds your streak, and each chapter ends with a boss battle — a bigger challenge that combines everything you just learned. Every passing test lands a hit, and when the boss falls, the next chapter opens.
This C# tutorial assumes no programming experience, but it never dumbs things down. Lessons explain why C# works the way it does, point out the mistakes beginners make most often, and teach the modern C# 14 style that professional .NET developers write today. If you already know Java, Python or JavaScript, you will move quickly and pick up the features that make C# special.
The whole first chapter is free and needs no account. Start now and write your first line of C# in under a minute.
Learn C#: frequently asked questions
Is this C# course free?
The entire first chapter — 8 lessons on variables, types, strings, operators, conditions and loops, plus a quiz and the first boss battle — is free, and you can play it without creating an account. The remaining chapters are unlocked with a one-time purchase of the course. There is no subscription.
Do I need to install Visual Studio or the .NET SDK?
No. The real C# compiler (Roslyn) and the .NET runtime run inside your browser using WebAssembly, so your code is compiled and executed right in the page. Open a lesson and start typing — it works on Windows, macOS, Linux and Chromebooks with nothing to install. The first run downloads the compiler once; after that, code runs in a fraction of a second.
Is this C# course suitable for complete beginners?
Yes. It assumes no programming experience. Each lesson explains one idea with small examples and then asks you to apply it in code, with hints if you get stuck. If you already know another language, you will move quickly through the basics and learn how C#'s types, classes, interfaces and LINQ work.
What is the 30% cashback?
We reward finishers. Buy the course, complete all of its lessons within 30 days of your purchase, and you can claim 30% of the price you paid back with one click (within 30 days of finishing).
Which version of C# and .NET does the course teach?
Modern C# 14 on .NET 10, the current long-term support release. You will use today's syntax — top-level statements, string interpolation, switch expressions, records, collection expressions and LINQ. Everything you write here works the same way in Visual Studio, VS Code, Rider or Unity scripts.
How are my solutions checked?
Every coding challenge comes with hidden tests that call your methods and classes with different inputs, including tricky edge cases. You see which tests pass or fail with the expected and actual values, plus compiler errors with line numbers and exception messages, so you can fix your code and try again as often as you like.
How long does it take to finish the C# course?
About 16 hours of focused practice spread over 34 lessons. About 35 minutes a day is enough to finish inside the 30-day cashback window; at a slower pace most learners need four to six weeks.