Codiqo

Learn C#
five minutes at a time.

C# is the language of Unity games and .NET apps, from Windows programs to web services. It's modern, strongly typed and pleasant to read.

Start the C# course free

60 lessons · about 11 hours · beginner friendly

Your first program

string name = "Pebble";
Console.WriteLine($"Hello, {name}!");

Output

Hello, Pebble!

The Codiqo C# course starts at Console.WriteLine and covers variables, strings, conditions, loops, lists, methods, LINQ, classes and interfaces. Every example was compiled with warnings treated as errors.

How the C# lessons work

Learn in small steps

Each lesson explains one idea with worked examples, then asks you about it straight away. About five minutes each.

Write real code

Predict the output, fix the bug, fill the gap and build programs line by line. Every lesson ends with a short program you write yourself, and we run it for real.

Keep it going

Earn XP, open chests, climb weekly leagues and keep your streak alive, with Pebble the penguin cheering you on and Terry the mentor giving hints.

The full C# curriculum

  1. Foundations

    Output, variables, types, input and logic.

    First Steps: Write your first C# programs.

    • Hello, C#: Print with Console.WriteLine
    • Variables and Types: Store values in int, double, bool, char and string
    • Arithmetic: Calculate with + - * / % and predict integer division
    • String Interpolation and Comments: Insert values into text with interpolated strings

    Text and Input: Work with strings and read input.

    • Strings: Join, measure and index text
    • String Methods: Use ToUpper, Trim, Substring, Contains and more
    • Reading Input: Read lines with Console.ReadLine and convert them
    • Project: Tip Calculator: Calculate and format a bill split

    Logic: Make true or false decisions.

    • Comparisons and bool: Compare values and store booleans
    • Logical Operators: Combine conditions with && || and !
    • Conversions and Math: Convert safely with TryParse and use the Math class
    • Project: Eligibility Checker: Decide eligibility from several conditions
  2. Control Flow

    Decisions, loops and methods.

    Making Decisions: Run different code depending on conditions.

    • if and else: Run code only when a condition is true
    • else if and Nesting: Choose between several paths
    • switch and Switch Expressions: Match values with switch
    • Project: Grade Calculator: Turn scores into grades

    Loops: Repeat work with while, for and foreach.

    • while and do-while: Repeat while a condition is true
    • for Loops: Count with for and nest loops
    • foreach, break and continue: Visit every item and control loops
    • Project: FizzBuzz: Solve the classic FizzBuzz problem

    Methods: Reuse code with methods.

    • Defining Methods: Write and call static methods
    • Parameters and Return Values: Use optional and named arguments
    • ref, out and Scope: Return several results and understand local variables
    • Project: Temperature Converter: Build a converter from small methods
  3. Data and LINQ

    Arrays, lists, dictionaries and queries.

    Arrays and Lists: Store and change collections of values.

    • Arrays: Create arrays and read and change items
    • List<T>: Grow and shrink lists
    • Looping and Searching: Find, count and check items
    • Project: To-Do List: Manage a list of tasks

    Dictionaries and LINQ: Look up by key and query data.

    • Dictionary: Store and look up key-value pairs
    • LINQ: Where and Select: Filter and transform collections
    • LINQ: Order, Sum and Group: Sort, total and group data
    • Project: Grade Statistics: Summarise a class's scores

    Text and Null Safety: Build text and handle missing values.

    • StringBuilder and Formatting: Build text and format numbers
    • Split and Join: Break text apart and put it back together
    • Nullable Types: Handle missing values with ?, ?? and ?.
    • Project: Word Counter: Count the words in a piece of text
  4. Object-Oriented C#

    Classes, inheritance, interfaces, errors and a complete project.

    Classes and Objects: Model things with your own classes.

    • Classes and Objects: Define a class and create objects
    • Constructors and Properties: Initialise objects and expose data with properties
    • Encapsulation: Protect state with private fields and validation
    • Project: Bank Account: Model an account with safe deposits and withdrawals

    Inheritance and Interfaces: Share behaviour and handle problems.

    • Inheritance: Extend classes and override methods
    • Interfaces and Polymorphism: Program to an interface
    • Exceptions: Throw and catch exceptions
    • Project: Shapes: Compute areas through a shared interface

    Capstone Project: Plan and build a complete C# program.

    • Planning and Modelling: Turn an idea into classes and records
    • Core Logic: Implement the main features
    • Errors and Testing: Handle bad input and check behaviour
    • Polishing: Improve output, structure and readability

Start learning C#

Questions about the C# course

Is the C# course free?

Yes. All 60 C# lessons, practice sessions, leagues and achievements are free. Codiqo Plus is optional and adds unlimited Compile Fuel.

Is it good for complete beginners?

Yes. It starts from your very first line of C# and explains every idea before asking you about it. If you already know some C#, a quick check lets you skip ahead.

How long does it take?

About 11 hours in all: 60 lessons of roughly five to ten minutes, in 4 chapters of 3 units. Most learners do a lesson or two a day.

Do I need to install anything?

No. Codiqo works in your browser and on iPhone and Android. The programs you write run on our servers in a locked-down sandbox, so there's nothing to set up.

What will I build?

Every lesson ends with a short program you write yourself, and the course finishes with "Capstone Project": Plan and build a complete C# program.

Other courses

Learn Python · Learn JavaScript · Learn C · Learn C++ · Learn Java