Learn C#
A free, interactive online C# course. You write C# on every lesson - syntax, classes, inheritance, interfaces, LINQ - with real C# code examples, AI hints when you're stuck, and a free certificate of completion when you finish.
112,314+ codders enrolled
- Beginner friendly
AI-assisted coding help
Hands-on interactive lessons
Audio narration on every lesson
Quizzes to test your knowledge
Free certificate of completion
Syllabus
Section 1
Fundamentals
Start sectionStartExpandCollapseBuild a strong foundation with essential concepts and basic skillsIntroduction
4 lessons323- 01C#Challenge
- 02Hello World!ChallengeQuiz
- 03CommentsQuiz
- 04Basic Program StructureChallengeQuiz
Variables Part 1
5 lessons539- 01NumbersChallengeQuiz
- 02CharChallengeQuiz
- 03StringChallengeQuiz
- 04BooleanChallengeQuiz
- 05Type DeclarationChallengeQuiz
Variables Part 2
5 lessons431- 01VarChallengeQuiz
- 02ConstantsChallengeQuiz
- 03Naming ConventionsQuiz
- 04Recap - Initialize VariablesChallenge
- 05Type CastingChallengeQuiz
Operators Part 1
5 lessons438- 01Arithmetic OperatorsChallengeQuiz
- 02Modulo OperatorChallengeQuiz
- 03Increment/DecrementChallengeQuiz
- 04Post Increment/DecrementQuiz
- 05Arithmetic ShortcutsChallengeQuiz
Operators Part 2
5 lessons531- 01Comparison OperatorsChallengeQuiz
- 02Logical Operators Part 1ChallengeQuiz
- 03Logical Operators Part 2ChallengeQuiz
- 04Recap - Simple LogicChallenge
- 05Logical Operators Part 3ChallengeQuiz
Decision Making
6 lessons638- 01If StatementChallengeQuiz
- 02If - ElseChallengeQuiz
- 03Switch StatementChallengeQuiz
- 04Ternary OperatorChallengeQuiz
- 05Recap - If ElseChallenge
- 06Nested If - ElseChallengeQuiz
Basic IO
6 lessons633- 01Basic OutputChallengeQuiz
- 02String InterpolationChallengeQuiz
- 03Reading InputChallengeQuiz
- 04ParseChallengeQuiz
- 05Recap - Till 120Challenge
- 06Recap - True or FalseChallenge
Calculator App
Project4 lessons1- 01Welcome MessageChallenge
- 02Getting NumbersProject
- 03Basic OperationsProject
- 04Formatted OutputProject
Loops
8 lessons752- 01For LoopChallengeQuiz
- 02While LoopChallengeQuiz
- 03Do While LoopChallengeQuiz
- 04BreakChallengeQuiz
- 05ContinueChallengeQuiz
- 06Nested LoopChallengeQuiz
- 07Infinite LoopQuiz
- 08Recap - Dynamic InputChallenge
Methods (Functions)
6 lessons641- 01Declaring MethodsChallengeQuiz
- 02Method ParametersChallengeQuiz
- 03Return TypesChallengeQuiz
- 04Optional ParametersChallengeQuiz
- 05Recap - Validation FunctionChallenge
- 06Void MethodsChallengeQuiz
Arrays Basics
6 lessons629- 01Declaring ArraysChallengeQuiz
- 02Accessing ElementsChallengeQuiz
- 03Modifying ArraysChallengeQuiz
- 04Array MethodsChallengeQuiz
- 05Recap - Product ArrayChallenge
- 06Edit Recap - Reversed ArrayChallenge
String Operations
3 lessons324- 01String Methods Part 1ChallengeQuiz
- 02String Methods Part 2ChallengeQuiz
- 03String FormattingChallengeQuiz
Iterating Over Collections
3 lessons323- 01Using For LoopChallengeQuiz
- 02Foreach LoopChallengeQuiz
- 03Common Array OperationsChallengeQuiz
Final Challenges
3 lessons38- 01Number PatternChallengeQuiz
- 02Pattern FinderChallenge
- 03Student Grade CalculatorChallenge
Section 2
Logic & Flow
Start sectionStartExpandCollapseMaster advanced C# programming with a focus on data structures and flow control. Learn to work with complex arrays, collections, error handling, and time management.Multi-dimensional Arrays
7 lessons750- 012D Arrays BasicsChallengeQuiz
- 02Declaring and Initializing 2DQuiz
- 03Accessing 2D Array ElementsChallengeQuiz
- 04Nested Loops with 2D ArraysChallengeQuiz
- 05Jagged ArraysChallengeQuiz
- 06Common Matrix OperationsChallengeMasteryQuiz
- 07Recap - Multi-dimensionalChallenge
Advanced Decision Making
5 lessons932- 01Multiple ConditionsChallengeMasteryQuiz
- 02Complex Boolean LogicChallengeMasteryQuiz
- 03If vs. Switch ComparisonChallengeMasteryQuiz
- 04Nested Switch StatementsChallengeMasteryQuiz
- 05Recap - Advanced DecisionsChallenge
Loop Enhancements
5 lessons632- 01Loop PerformanceChallengeQuiz
- 02Iterating ComplexChallengeQuiz
- 03Each Loop TypeChallengeMasteryQuiz
- 04Refactoring LoopsChallengeQuiz
- 05Recap - Optimized LoopsChallenge
Flow Control Techniques
5 lessons938- 01Early ReturnsChallengeQuiz
- 02Guard ClausesChallengeMasteryQuiz
- 03Jump Statements (goto)ChallengeMasteryQuiz
- 04Break and ContinueChallengeMasteryQuiz
- 05Flatten Nested ConditionalsChallengeMasteryQuiz
Exception Handling
8 lessons1160- 01Try-Catch BasicsChallengeMasteryQuiz
- 02Exception TypesChallengeQuiz
- 03Multiple Catch BlocksChallengeMasteryQuiz
- 04Working with FilesChallengeQuiz
- 05Finally BlockChallengeMasteryQuiz
- 06Using vs. Try-FinallyChallengeQuiz
- 07Custom ExceptionsChallengeQuiz
- 08Recap - Error HandlingChallenge
Null Handling
5 lessons832- 01Null Reference BasicsChallengeMasteryQuiz
- 02Nullable Value TypesChallengeQuiz
- 03Null Checking PatternsChallengeMasteryQuiz
- 04Defensive ProgrammingChallengeMasteryQuiz
- 05Recap - Null SafetyChallenge
Logical Operators Advanced
4 lessons723- 01Short-Circuit EvaluationChallengeMasteryQuiz
- 02Conditional Logical OperatorsChallengeMasteryQuiz
- 03Operator PrecedenceChallengeMasteryQuiz
- 04Recap - Advanced OperatorsChallenge
Data Analysis System
Project6 lessons1- 01Data Collection SetupChallenge
- 02Data Entry LogicProject
- 03Data AnalysisProject
- 04Grading LogicProject
- 05Report GenerationProject
- 06 Error HandlingProject
HashMap Part 1
6 lessons536- 01What is a HashMap?Quiz
- 02Declare a HashMapChallengeQuiz
- 03Check If Key ExistsChallengeQuiz
- 04Accessing ValuesChallengeQuiz
- 05Modifying DictionariesChallengeQuiz
- 06Recap - HashMapChallenge
HashMap Part 2
4 lessons415- 01HashMap MethodsChallengeQuiz
- 02Nested HashMapChallengeQuiz
- 03Recap - Manage WarehouseChallenge
- 04Recap - HashMap OperationsChallenge
HashSet Part 1
6 lessons537- 01What is a HashSet?Quiz
- 02Adding an ElementChallengeQuiz
- 03Removing an ElementChallengeQuiz
- 04Checking if an Element ExistsChallengeQuiz
- 05Empty and SizeChallengeQuiz
- 06Recap - HashSetChallenge
HashSet Part 2
5 lessons539- 01Math - Union of HashSetsChallengeQuiz
- 02Math - Intersection of HashSetChallengeQuiz
- 03Math - Set DifferenceChallengeQuiz
- 04Math - Symmetric DifferenceChallengeQuiz
- 05Iterating Over SetsChallengeQuiz
Section 3
Object Oriented Programming
Start sectionStartExpandCollapseDiscover how to organize code with classes, objects, and reusable structuresFundamentals of OOP
9 lessons972- 01External FilesChallengeQuiz
- 02Namespaces & DirectivesChallengeQuiz
- 03Intro to Classes & ObjectsChallengeQuiz
- 04The 'this' KeywordChallengeQuiz
- 05Methods and ParametersChallengeQuiz
- 06Fields vs PropertiesChallengeQuiz
- 07ConstructorsChallengeQuiz
- 08Object InitializersChallengeQuiz
- 09Recap - Simple CalculatorChallenge
Properties & Static Members
5 lessons545- 01Auto-Implemented PropertiesChallengeQuiz
- 02Read/Write-Only PropertiesChallengeQuiz
- 03Static Fields & MethodsChallengeQuiz
- 04Static ClassesChallengeQuiz
- 05Expression-Bodied MembersChallengeQuiz
Class Architecture
4 lessons427- 01Instance vs Static DataChallengeQuiz
- 02'readonly' & 'const' KeywordsChallengeQuiz
- 03Backing FieldsChallengeQuiz
- 04Recap - Bank Account ManagerChallenge
Inheritance
6 lessons644- 01Basic Inheritance (:) SyntaxChallengeQuiz
- 02The 'base' KeywordChallengeQuiz
- 03Virtual & Override KeywordsChallengeQuiz
- 04Sealed ClassesChallengeQuiz
- 05The 'object' Base ClassChallengeQuiz
- 06Recap - Employee HierarchyChallenge
Polymorphism & Interfaces
6 lessons644- 01Compile vs Runtime PolyChallengeQuiz
- 02Interface vs Abstract ClassChallengeQuiz
- 03Multiple InterfacesChallengeQuiz
- 04Explicit InterfacesChallengeQuiz
- 05Upcasting & DowncastingChallengeQuiz
- 06Recap - Shape CalculatorChallenge
Encapsulation
5 lessons535- 01Access ModifiersChallengeQuiz
- 02Properties for EncapsulationChallengeQuiz
- 03Data Hiding ImplementationChallengeQuiz
- 04Immutability PatternsChallengeQuiz
- 05Recap - Student RecordsChallenge
Advanced Features
5 lessons535- 01Operator OverloadingChallengeQuiz
- 02Indexers (this[])ChallengeQuiz
- 03ToString() OverrideChallengeQuiz
- 04Extension MethodsChallengeQuiz
- 05Recap - Custom ListChallenge
Advanced OOP Concepts
6 lessons653- 01Composition over InheritanceChallengeQuiz
- 02Generics (Classes & Methods)ChallengeQuiz
- 03Delegates and EventsChallengeQuiz
- 04Attributes and ReflectionChallengeQuiz
- 05IDisposable & using StatementChallengeQuiz
- 06Dependency Injection BasicsChallengeQuiz
Variable Arguments
4 lessons436- 01The 'params' KeywordChallengeQuiz
- 02Optional ParametersChallengeQuiz
- 03Named ArgumentsChallengeQuiz
- 04Method OverloadingChallengeQuiz
Design Patterns Part 1
5 lessons545- 01Intro to Design PatternsChallengeQuiz
- 02Thread-Safe SingletonChallengeQuiz
- 03Factory PatternChallengeQuiz
- 04Observer Pattern (Events)ChallengeQuiz
- 05Strategy PatternChallengeQuiz
Design Patterns Part 2
6 lessons655- 01Command PatternChallengeQuiz
- 02Adapter PatternChallengeQuiz
- 03Decorator PatternChallengeQuiz
- 04Template Method PatternChallengeQuiz
- 05State PatternChallengeQuiz
- 06Composite PatternChallengeQuiz
Project: Library System
Project6 lessons1- 01Project StructureChallenge
- 02Book and User ModelsProject
- 03Borrowing System LogicProject
- 04LINQ for SearchingProject
- 05Console UI / Admin InterfaceProject
- 06Unit Testing (NUnit/xUnit)Project
Final Challenges
3 lessons3- 01E-learning PlatformChallenge
- 02Game Character ComponentChallenge
- 03Vehicle Rental ServiceChallenge
C# courses
Hands-on C# courses, free to start in your browser.
Beginner Challenges - Practice Basic Concepts
PopularPut your beginner coding knowledge to test and try to solve this programming challenges, use any language you want, Happy Coding!
Certificate on completion
- 20
- 20
Coding Problems
PopularPut your programming problem solving skills to the test using the exercises with different difficulties in this course. Designed for coders with some prior knowledge of the basic syntax in any programming language.
Certificate on completion
- 32
- 31
Coding Problems: Volume 2
Put your programming problem solving skills to the test using the exercises with different difficulties in this course. Designed for coders with some prior knowledge of the basic syntax in any programming language. This course is an extension of the first Coding Problems
Certificate on completion
- 25
- 24
Stack - Data Structures Series #1
In this course, you will learn about the Stack data structure, create a Stack from zero using your preferred language, and practice coding challenges with it!
- 13
- 6
- 1
Recursion Challenges - Master The Recursive Thinking
Recursion is an important concept in computer science and a very powerful tool in writing algorithms. In this course, you will use recursion to solve challenges from beginner to advanced. In the end, you will ace this topic.
Certificate on completion
- 15
- 15
Star Pattern Bootcamp
Put your programming problem solving skills to learn how to print star patterns range from simple to complex, involving different levels of nested loops, conditional statements, and mathematical calculations.
- 30
- 28
Why learn C# with Coddy
- Write and run real C# code in your browser. No Visual Studio install, no .NET SDK setup. Each lesson compiles your C# program server-side and shows the output instantly.
- Object-oriented C# the way it's used in production: classes, properties, inheritance, interfaces, generics, exception handling, LINQ. Code examples and exercises after every concept.
- AI hints help you debug C# code and read compiler errors so the language feels approachable instead of intimidating, especially if you're new to OOP.
- Free C# certificate of completion when you finish. Useful for game-dev (Unity), backend, and enterprise roles where C# fluency is a baseline expectation.