Hands-On: C# for Beginners

Learn C# from scratch by completing practical exercises, writing real C# code.

About This Course

Learning C# by just reading about it is not enough. You need to get your hands dirty and write some real-world code to solve real-world problems. In this 21+ hour course, you will complete more than 220 practical exercises using Dometrain’s state-of-the-art web Code Editor, starting from the very basics all the way to intermediate and advanced features. This course assumes you have some basic understanding of programming, but you don’t know C# at all. At Dometrain, we want to be the best place for developers to learn programming languages and concepts from scratch, so we are offering this course completely free, with lifetime access. Whether you are just starting out or you want to flesh out your skills, you can take this course and make sure your C# engineering knowledge is up to date.

Course Curriculum

20h 57m 27 sections
Console printing
05:00
Console.Write
05:00
Console.ReadLine
05:00
Single line comments
05:00
Multi line comments
05:00
Variables
05:00
Constants
05:00
The var keyword
05:00
Integers
05:00
Doubles
05:00
Decimals
05:00
Strings
05:00
Escape Sequences
05:00
Verbatim Strings
05:00
String concatenation
05:00
String interpolation
05:00
Chars
05:00
Booleans
05:00
Floats
06:00
The static keyword
06:00
Addition
05:00
Subtraction
05:00
Multiplication
05:00
Division
05:00
The Modulo operator
05:00
Order of operations
05:00
Compound assignment operators
05:00
Increment and Decrement
05:00
Comparison operators
07:30
Logical AND
05:00
Logical OR
05:00
Logical NOT
05:00
Logical patterns
05:00
If statements
05:00
If-Else statements
05:00
Else-If chains
05:00
Switch statements
05:00
Switch expressions
05:00
The Ternary operator
05:00
While Loops
05:00
Avoiding Infinite Loops
05:00
Do-While Loops
05:00
For Loops
05:00
For Loop Counting Down
05:00
For-Each Loops
05:00
The break statement
05:00
The continue statement
05:00
Nested Loops
05:00
Defining void methods
05:00
Method parameters
05:00
Return values
05:00
Using return values
05:00
Method overloading
05:00
Optional parameters
05:00
Named arguments
05:00
Params arguments
05:00
ref Parameters
06:40
out Parameters
06:40
in Parameters
06:40
Creating Arrays
05:00
Array Initializer Syntax
05:00
Modifying Array Elements
05:00
Looping Arrays with for
05:00
Looping Arrays with foreach
05:00
Multi-Dimensional Arrays
05:00
Jagged Arrays
06:00
Ranges and Indices
06:40
Creating Lists
05:00
Adding to Lists
05:00
Accessing List Elements
05:00
Removing from Lists
05:00
Checking List Contents
05:00
Sorting Lists
05:00
Creating Dictionaries
05:00
Adding and Accessing Dictionary Items
05:00
Checking Dictionary Keys
05:00
Looping Through Dictionaries
05:00
Defining a Class
05:00
Fields
05:00
Default Constructors
05:00
Parameterized Constructors
05:00
Constructor Overloading
07:30
Auto-Properties
06:40
Read-Only Properties
05:00
Private Set Properties
07:30
Instance Methods
05:00
The this Keyword
07:30
Public Access Modifier
06:40
Private Access Modifier
07:30
Static Fields
05:50
Static Methods
06:40
Inheritance Basics
06:40
The base Keyword
06:40
Virtual Methods
08:20
Method Overriding
06:40
Abstract Classes
06:40
Abstract Methods
06:40
Defining Interfaces
06:40
Implementing Interfaces
07:30
Multiple Interfaces
06:40
Default interface methods
06:40
Defining Structs
05:00
Value Type Behavior
05:50
Defining Enums
05:50
Enum Values
05:50
Enums in Switch
05:50
Defining Records
05:50
Positional Records
05:50
Record With Expressions
06:40
Try-Catch Blocks
06:00
Exception Messages
06:00
Multiple Catch Blocks
06:00
The Finally Block
06:00
Throwing Exceptions
06:00
Custom Exception Messages
06:00
Generic Classes
06:40
Using Generic Classes
06:40
Generic Methods
06:40
Generic Constraints
06:00
Defining Delegates
06:00
Using Delegates
06:00
Action Delegates
06:00
Func Delegates
06:00
Lambda Expression Basics
06:00
Lambda with Multiple Statements
06:00
Events
06:40
Subscribing to Events
06:40
Introduction to LINQ
05:00
LINQ Query Syntax
06:40
Where for Filtering
06:00
Select for Transforming
06:00
OrderBy for Sorting
06:00
ThenBy for Secondary Sorting
06:00
Count and Sum
06:00
Average, Min, and Max
06:40
First and FirstOrDefault
06:00
Single and SingleOrDefault
06:00
Any and All
06:00
Async and Await
06:40
Returning Values from Async
06:40
Task.WhenAll
06:00
Task.WhenAny
06:00
ToUpper and ToLower
06:00
Trim
05:00
Substring
05:00
Replace
05:00
Split
05:00
Join
05:00
Contains and IndexOf
06:00
StartsWith and EndsWith
06:00
String Comparisons
07:30
Format Specifiers
06:00
Interpolation Format
06:00
StringBuilder
05:00
DateTime Basics
05:00
Creating DateTime Values
05:00
Formatting Dates
06:40
Parsing Dates
06:40
Date Arithmetic
06:40
TimeSpan Basics
06:40
Comparing Dates
05:00
DateOnly Basics
06:00
TimeOnly Basics
06:40
Nullable Value Types
05:00
The Null-Coalescing Operator
05:00
Nullable Reference Types
06:00
The Null-Conditional Operator
05:00
The Null-Forgiving Operator
05:00
Type Checking with is
06:00
Type Patterns with Variables
05:00
Switch with Type Patterns
06:00
Property Patterns
06:00
Relational Patterns
06:00
Switch Expressions
06:00
When Guards
06:00
Creating Tuples
06:00
Named Tuple Elements
05:00
Returning Tuples from Methods
05:00
Tuple Deconstruction
06:00
Anonymous Types
05:00
Extension Methods
06:00
Understanding Attributes
06:00
Creating Custom Attributes
06:40
The using Statement
08:20
Init-Only Properties
06:00
Required Properties
06:00
Raw String Literals
06:00
Collection Expression Syntax
06:00
Spread Operator in Collections
06:00
Primary Constructors
06:00
Implicit Conversion
06:00
Explicit Conversion (Casting)
05:00
The Convert Class
05:00
Parse Methods
05:00
TryParse Methods
05:00
Checked Arithmetic
06:00
Unchecked Arithmetic
05:00
Writing Text Files
05:00
Reading Text Files
06:00
File Lines
06:00
Checking File Existence
05:00
Path Manipulation
04:55
JSON Serialization
06:00
JSON Deserialization
05:00
Introduction to HttpClient
06:40
Making GET Requests
06:00
HttpResponseMessage
08:20
Checking Status Codes
06:00
Using BaseAddress
05:00
Making POST Requests
06:00
Sending JSON with POST
06:40
Deserializing JSON Responses
06:00
Setting Request Headers
06:00
Handling HTTP Errors
06:40
PUT and DELETE Requests
06:00
Async HTTP Operations
08:20
Params Collections
04:58
The Lock Type
06:00
Partial Properties
06:00
The field Keyword
06:00

Meet Your Instructor

Nick Chapsas

Nick Chapsas

Nick Chapsas is a .NET & C# content creator, educator and a Microsoft MVP for Developer Technologies with years of experience in Software Engineering and Engineering Management.

He has worked for some of the biggest companies in the world, building systems that served millions of users and tens of thousands of requests per second.

Nick creates free content on YouTube and is the host of the Keep Coding Podcast.

View all courses by Nick Chapsas

What's New

Getting Started: AI for .NET Developers
course

Getting Started: AI for .NET Developers

Get started with integrating AI into your .NET applications effectively using the latest LLM best practices.

Learn more about Getting Started: AI for .NET Developers
Getting Started: Building .NET Applications on AWS
course

Getting Started: Building .NET Applications on AWS

Learn how to build and deploy .NET applications on AWS using CDK, Lambda, DynamoDB, S3, and more.

Learn more about Getting Started: Building .NET Applications on AWS
What's new in C# 14
blog

What's new in C# 14

This guide covers every new C# 14 feature, explains its benefits, and provides practical code examples to help you navigate how you can use them.

Learn more about What's new in C# 14
Let's Build It: AI Chatbot with RAG in .NET Using Your Data
course

Let's Build It: AI Chatbot with RAG in .NET Using Your Data

Build a Retrieval-Augmented Generation (RAG) chatbot that can answer questions using your data.

Learn more about Let's Build It: AI Chatbot with RAG in .NET Using Your Data
From Zero to Hero: SignalR in .NET
course

From Zero to Hero: SignalR in .NET

Enable enterprise-grade real-time communication for your web apps with SignalR.

Learn more about From Zero to Hero: SignalR in .NET
Deep Dive: Solution Architecture
course

Deep Dive: Solution Architecture

Master solution architecture and turn business needs into scalable, maintainable systems.

Learn more about Deep Dive: Solution Architecture
Migrating: ASP.NET Web APIs to ASP.NET Core
course

Migrating: ASP.NET Web APIs to ASP.NET Core

A step-by-step process to migrate ASP.NET Web APIs from .NET Framework to ASP.NET Core.

Learn more about Migrating: ASP.NET Web APIs to ASP.NET Core
Getting Started: Caching in .NET
course

Getting Started: Caching in .NET

Let's make the hardest thing in programming easy for .NET software engineers.

Learn more about Getting Started: Caching in .NET
From Zero to Hero: Testing with xUnit in C#
course

From Zero to Hero: Testing with xUnit in C#

Learn how to test any codebase in .NET with the latest version of xUnit, the industry-standard testing library.

Learn more about From Zero to Hero: Testing with xUnit in C#
Create a ChatGPT Console AI Chatbot in C#
blog

Create a ChatGPT Console AI Chatbot in C#

This walkthrough is your hands-on entry point to create a basic C# console application that talks to ChatGPT using the OpenAI API.

Learn more about Create a ChatGPT Console AI Chatbot in C#