
In this quick setup guide, we will get your C# development environment ready. We cover how to install the free Visual Studio Code editor and the essential C# Dev Kit extension. You also learn where to download and install the .NET SDK, which is necessary for building and running C# programs. Visual Studio Code (VS Code) VS Code is a free, lightweight code editor from Microsoft that you can use to write, debug, and manage C# projects on any operating system.
Set up:
Download VS Code
Download .NET SDK
In this video, you'll write and run your very first C# console program. We show you how to start a new project in VS Code using dotnet new console. We also explain the modern "top-level programs" feature that keeps your code clean and automatically handles the Main method. Finally, you'll use Console.WriteLine to display a message. C# program is a set of statements the computer runs to complete specific tasks.
Commands Used:
dotnet new console - Creates a new console application
dotnet new list - Shows all available project types
dotnet run or F5 - Runs your C# program.
In this quick video, you will learn the fundamental role of variables in C#. They are like named containers that hold information your program needs to run. We cover how to declare a variable (like int age = 25), why they are essential for storing and managing data, and how you can update their values as your program runs.
Variables are named storage locations in memory that hold data values which can be accessed and modified throughout your program.
This video explains the different types of data you can store in C#. We cover the main types, including int (whole numbers), double (decimals), string (text), bool (true/false), and char (single characters). You will also learn about specific types like decimal for money and the convenient var keyword.
Data types specify what kind of data a variable can store and how much memory it uses, ensuring the code works correctly.
In this quick lesson, we learn how to make your C# program interactive by getting User Input. We cover the Console.ReadLine() command for receiving text from the user. We also show how to use int.TryParse() for safely converting the text input into numbers.
Text is fundamental to programming. In this video, you'll learn how to create, combine, search, and manipulate text efficiently. You'll cover essential string operations such as:
Using .Length to count characters
Changing text case with .ToUpper() and .ToLower()
Searching text using .Contains()
and removing extra spaces with .Trim()
A pro tip: Strings in C# never change, so use StringBuilder for handling lots of text efficiently.
Learn how C# performs calculations using standard arithmetic operators. This video explains the fundamental math operations that make calculations simple and fast in your code.
You will learn the common operators: +, -, *, /, and the Modulo Operator (%) to find the remainder after division. Discover why 5/2 equals 2, not 2.5 and how to get decimal results by casting, like (double)5/2. You can also access advanced functions like Math.Sqrt() and Math.Pow() using the built-in Math class
Boolean logic is how your code gets its brain, enabling your programs to make smart decisions. This video breaks down how to use true/false values and logical operators to combine conditions.
Logical Operators: Combine multiple conditions with && (AND) for when both things must be true, || (OR) when either one works, and ! (NOT) to flip the result.
How does your code decide what to do next? If statements act like a personal assistant, making choices based on the data you give them.
In this video, we cover the basic recipe: if (true) { do this }. We also explain how to use else for backup plans and else if to handle multiple scenarios, like assigning grades based on test scores.
Switch statements make your code cleaner by replacing long, messy if-else chains. They are the perfect tool when you need to check a single variable against multiple specific values.
In this video, we cover the classic syntax using case and break , as well as modern C# switch expressions that allow you to map values in a concise, readable format.
For loops are the fundamental building blocks for repeating tasks in programming. Instead of writing the same line of code ten times, you can write it once and let the loop handle the repetition.
In this video, we break down the three parts of a for loop - start, condition, and step - and show you how to use the counter variable to control exactly how many times your code runs.
Sometimes in C# programming, you do not know exactly how many times you need to loop. You just need to keep iterating until a specific condition changes. That is where while and do-while loops become essential tools for developers.
In this tutorial, we explore the key difference between these two C# loops. The while loop checks the condition before execution, whereas the do-while loop guarantees the code runs at least once. We also cover how to avoid the dreaded infinite loop trap in your applications.
Arrays in C# are like numbered parking spaces for your data. They allow you to store multiple values of the same type in a single variable. This makes them fast, memory-efficient, and essential for high-performance .NET code.
In this C# tutorial, we cover how to declare and initialize arrays. We explain how to access data using zero-based indexing and the importance of the Length property. We also discuss when to use arrays versus more flexible collections like Lists.
Arrays are great, but they are stuck at a fixed size. What happens when you need to add or remove items on the fly? That’s where Lists come in.
In this video, we explore the List class, which is a dynamic collection that grows and shrinks automatically. We cover essential methods like .Add(), .Remove(), .Insert(), and .Contains(), and explain why Lists are the default choice for most real-world scenarios over arrays.
Learn how to create your first method in C# to make your code reusable and clean. This video explains the basic syntax of a void method and demonstrates how to call it within your application. Understanding methods is a crucial step in moving from writing simple scripts to building organized software.
In this video, you will learn how to make your methods more flexible by using parameters and arguments. We explain how to update a method's signature to accept data, like a string or an integer. You will also see how to pass multiple values of different types and why the order of these values matters when calling your method.
In this video, you will learn how to send data back from a method to the code that called it. We explain how to change a method from void to a specific return type, like an integer or a string. You will also see how the return keyword works to end a method and deliver a result that you can reuse throughout your program.
Return Value Return values let methods send data back to the code that called them, so you can use the results in other parts of your program.
This video explains "Scope," which determines exactly where your variables can be seen and used. We break down the differences between method scope, block scope (inside curly braces), and top-level scope. Understanding these "rooms" for your variables will help you avoid errors and keep your code much cleaner.
Scope determines where variables can be accessed in your code, defining their visibility and lifetime.
In this video, we discuss how to use comments to make your code easier to read. You will learn the syntax for single-line, multi-line, and XML comments. We also share a professional tip: focus on commenting "why" you wrote the code rather than "what" it is doing, and use clear naming to reduce the need for comments.
Comments are non-executable text in code that explain what the code does, why it exists, and how it works.
Bugs happen to everyone, but debugging skills can turn those problems into wins. In this video, we explore how to find and fix errors using Visual Studio tools
From tracking events to calculating ages, DateTime is a tool you will use all the time in C# programming. This quick guide covers the essentials of creating, formatting, and manipulating temporal data.
Good naming makes your code look professional and easy to read. In this video, we break down the C# naming convention rules that help other programmers understand your code instantly.
"Null means 'nothing here!'". Understanding null is critical because it helps stop program crashes that frustrate users. In this video, we explain what null represents and how to handle it safely in C#.
Sometimes you need to turn text into numbers or switch between data types to make your application work correctly. In this C# tutorial, we break down the critical differences between implicit and explicit conversion and demonstrate why using TryParse is much safer than direct casting. We also explore the Convert class so you know exactly which tool to use to prevent data loss and crashes in your code.
What exactly is Object-Oriented Programming? Think of it like building with LEGO bricks rather than raw cement. We explain how creating reusable objects containing both data and actions makes complex programs manageable. You will learn about the four core pillars:
Encapsulation
Inheritance
Polymorphism
Abstraction
and understand how they transform simple scripts into robust, scalable applications used by professionals.
Classes are the blueprints of Object-Oriented Programming, and in this video, we show you how to write your very first one. You will learn the syntax for defining a class with properties and how to use the 'new' keyword to create actual objects from that template. We explain the relationship between a class and an object using the cookie cutter analogy so you can start building your own custom data structures immediately.
Constructors are special methods that run automatically the moment you create a new object, acting like a birth certificate that ensures your data is ready to use immediately. In this tutorial, we explain the difference between default and parameterized constructors and show you how to set initial values in a single line of code.
We also cover constructor chaining using the 'this' keyword to keep your code clean and discuss why initializing objects to a valid state prevents bugs down the road.
Properties versus fields is a fundamental concept in C# regarding data safety and encapsulation. In this video, we compare public fields (the "open box" approach) with properties (the "safe" approach) that utilize get and set accessors to control access. You will learn how to use auto-properties for cleaner code and full properties when you need to add validation logic or compute values, ensuring your data remains protected while maintaining a professional codebase.
Access modifiers act as security levels for your code, controlling exactly which parts of your application can communicate with each other. In this tutorial, we break down the four main modifiers (Public, Private, Protected, and Internal) and explain why you should always default to the most restrictive level possible.
Static versus instance members represents the difference between data shared by the whole class and data unique to specific objects. In this video, we clarify the static keyword using a school analogy and explain why static members are accessed through the class name while instance members require an object.
Inheritance is a powerful feature in C# that allows you to reuse code and create logical hierarchies. In this tutorial, we explore the syntax of inheritance using the colon operator and how to model "is-a" relationships.
Using the family tree analogy, we demonstrate how derived classes inherit properties from base classes, allowing you to build specialized objects (like creating a Dog from an Animal base) without starting your code from scratch.
Method overriding is the mechanism that allows child classes to provide specific implementations for methods inherited from a parent class.
In this tutorial, we break down how to use the virtual and override keywords to achieve runtime polymorphism. Using the classic animal sound analogy, we demonstrate how a single MakeSound method can produce different results for a Dog versus a Cat, ensuring your code remains flexible and extensible without breaking existing functionality.
Abstract classes act as partial blueprints for your code, defining shared structure while enforcing specific behavior in child classes. In this video, we explain how to use the abstract keyword to create classes that cannot be instantiated directly but serve as a contract for derived objects. Using a Shape analogy, we demonstrate how abstract methods force subclasses to provide their own unique logic while maintaining a consistent interface across your application.
Interfaces are pure contracts that define behavior without implementation, enabling flexible and robust code design. In this video, we cover the syntax for defining and implementing interfaces in C#. We also explore a key feature of the language where classes can implement multiple interfaces at once, unlike class inheritance, and explain how this supports polymorphism and loosely coupled code that is easier to maintain and test.
Polymorphism is one of the most powerful pillars of Object-Oriented Programming, literally meaning "many forms." In this tutorial, we demystify this complex-sounding term using a simple analogy of a "Play" button that works differently on various devices.
Encapsulation is more than just a buzzword, it is the key to writing secure and maintainable code. In this video, we explore the major benefits of encapsulation, including how to bundle data with the code that operates on it while hiding internal complexity.
Composition versus inheritance is a classic architectural choice in Object-Oriented Programming that defines how your objects relate to one another. In this video, we compare the "has-a" relationship of composition (like a Car having an Engine) against the "is-a" relationship of inheritance (like a SportsCar being a Car). We explain why composition often provides more flexibility and why the design principle "favor composition over inheritance" leads to looser coupling and code that is easier to maintain in the long run.
Method overloading allows you to create multiple versions of the same method with different parameters, making your code cleaner and more intuitive. In this tutorial, we demonstrate how to define methods like Add for integers and doubles within the same class while the compiler automatically selects the right one. We also look at the real-world example of Console.WriteLine and explain the strict rules regarding parameter types and counts to ensure your overloads are valid.
Every class in C# inherits from the base Object class, giving you default methods that often need customization. In this video, we explain how to override ToString() to replace generic type names with meaningful data for easier debugging and logging.
We also cover why you should override Equals() and GetHashCode() to ensure your objects compare correctly based on their content rather than their memory reference, making them work seamlessly with .NET collections like dictionaries.
Lists are the go-to collection in C#. We explore built-in methods, LINQ integration, and analyze performance using Big O notation (O(1) vs O(n)). Learn how internal resizing works and how to optimize your code for technical interviews and real-world apps.
Dictionaries are the best tool for fast data retrieval in C#. We cover how to manage key-value pairs, use TryGetValue for safety, and explain the O(1) constant time performance that makes lookups instant regardless of dataset size. Perfect for caching, counting, and high-speed applications.
Should you use an Array or a List? We compare the fixed-size performance of Arrays against the dynamic flexibility of Lists. Learn the memory trade-offs, when to optimize for speed, and why Lists are usually the best choice for everyday C# development.
HashSet is the ultimate tool for enforcing uniqueness in your data. We explain how to automatically remove duplicates, perform mathematical set operations (Union, Intersect), and why it is significantly faster than Lists for membership checks.
We compare two essential data structures: Queue (First-In-First-Out) and Stack (Last-In-First-Out). Learn the difference between Enqueue/Dequeue and Push/Pop, and discover when to use a Queue for background processing versus a Stack for "undo" functionality or recursion.
We break down the three main loop types in C#: foreach for readability, for for index control, and while for conditional logic. Learn the performance differences (index vs enumerator) and best practices for choosing the right loop to keep your code clean and efficient.
We explain how to populate Lists and Dictionaries in a single line without repeated Add calls. Learn the classic syntax for objects and key-values, plus modern C# features like target-typed new and collection expressions for the cleanest possible code.
We explain why the legacy ArrayList has been replaced by modern generic collections like List of T. Learn how ArrayList forces unsafe casting and performance-heavy boxing/unboxing, and why Generic Collections are faster, type-safe, and the standard for all modern C# development.
Two-dimensional arrays are perfect for representing grids, game boards, and spreadsheets. We cover how to declare and access data using [,] syntax, iterate using nested loops, and explain the key difference between standard multi-dimensional arrays and jagged arrays ([][]) for rows of varying lengths.
Sorting is essential for organizing data. We demonstrate how to sort primitive types and custom objects using the built-in List.Sort() for in-place modification, and compare it with LINQ's OrderBy and ThenBy for creating new sorted sequences. Learn when to use Lambda expressions to customize your sorting logic.
In this part we explore linear searches, binary searches, and hash lookups in C#.
Stop guessing which collection to use! We break down the Big O performance of Lists, Dictionaries, HashSets, Arrays, and more. Learn how operations scale under the hood—from O(1) instant lookups to O(log n) sorting—so you can choose the exact right data structure and avoid critical bottlenecks in your applications.
System.Collections.Immutable provides thread-safe, immutable collection types for .NET. In this quick overview, we explore how ImmutableList of T works and how structural sharing lets you add or update data by creating efficient new versions—without ever modifying the original collection. Clean, safe, and predictable.
Sometimes standard collections aren't enough. We explain how to build Custom Collections in C# to define specialized behavior.
Choosing the right collection is like picking the right tool for the job. In this video, we provide a rapid-fire decision guide (e.g., Dictionary for lookups, HashSet for uniqueness) and share essential performance tips like setting List capacities and using TryGetValue(). Learn how to write cleaner, faster C# code by making smart collection choices!
LINQ (Language-Integrated Query) transforms how you handle data by replacing clunky loops with readable, English-like queries. We introduce how LINQ works seamlessly across arrays, databases, and XML. Learn the difference between Query syntax (SQL-like) and Method syntax (Lambda chaining), and why both compile to the exact same efficient code!
Learn about the core LINQ operations: Where (filter), Select (transform), and OrderBy (sort). We show how to chain these methods to build powerful data processing pipelines, and explain the critical concept of "lazy execution".
Want to write cleaner LINQ queries? We dive into LINQ Method Syntax and how to use fluent, chained method calls. Learn how to read and write Lambda expressions, and discover why Method syntax often provides better IntelliSense and tooling support than traditional Query syntax.
Lambda expressions are the secret to writing clean, concise code. We explain how anonymous functions work, how to write them with single or multiple parameters, and how they replace clunky old delegate syntax. Plus, understand "closures" and how lambdas can capture variables from their surrounding scope!
The LINQ Where method is your ultimate "data bouncer." We cover how to filter collections using simple lambda expressions, combine multiple criteria with logical operators (like &&), and why returning IEnumerable makes your filter chains "lazy" and incredibly efficient.
The LINQ Select method is your ultimate data transformer. We explain how to "project" your data—meaning you can extract specific properties, change data types, or reshape your collections into new anonymous objects. Perfect for creating DTOs (Data Transfer Objects) for your APIs!
The LINQ GroupBy method is the ultimate tool for organizing your collections. We explain how to group items by a single property, access the Key to iterate through your new groups, and use anonymous objects to create composite keys (grouping by multiple properties at once). Perfect for generating reports, finding averages, and transforming raw data into real insights!
Combine related collections just like you would in SQL! We explain how to connect data using Join for standard inner joins, and GroupJoin for one-to-many relationships. You'll also learn how to create Left Joins using DefaultIfEmpty(), plus a crucial performance tip (materialization) to keep your queries running fast.
Turn your C# collections into meaningful statistics! We cover essential LINQ aggregation methods like Sum, Average, Max, Min, and Count. Learn how to combine them with Where and GroupBy for advanced data analysis, and understand why these "terminal operations" force your lazy queries to execute immediately.
Grabbing a single item from a collection shouldn't crash your app! We break down the exact differences between First, FirstOrDefault, Single, and SingleOrDefault in C#. Learn when to expect exceptions, how to handle missing data gracefully by returning null, and which method is best for enforcing data validation.
Stop writing manual loops to check your collections! We explain how to use LINQ's Any and All methods to quickly answer yes/no questions about your data. Discover how "short-circuit evaluation" makes these methods lightning-fast by stopping the search the exact moment an answer is found.
Need to grab only a specific chunk of a collection? We explain how to use LINQ's Take and Skip methods to easily slice your data. Learn how chaining them together creates the perfect logic for UI pagination, and why their "lazy evaluation" makes them incredibly efficient when combined with Where filters!
Got duplicates in your collections? We'll show you how to clean them up instantly using C# LINQ! Learn how to use Distinct to remove repeating values from a single list, and Union to merge two collections together while keeping only unique items. Plus, discover how DistinctBy and UnionBy (introduced in C# 10) let you easily remove duplicates based on specific object properties.
LINQ is incredibly powerful, but it can easily slow down your application if misused! We cover essential optimization tips, including why you must materialize queries with ToList() to avoid the dreaded "multiple enumeration" trap. Plus, learn when to use AsParallel() for heavy CPU tasks and why you should always profile your code with BenchmarkDotNet instead of guessing where the bottlenecks are.
Ready to build complex data pipelines? We tackle advanced LINQ scenarios by chaining multiple operations together (GroupBy, Select, Sum, and OrderByDescending) to generate reports like a "Top 5 Customers" dashboard. Plus, discover the magic of the SelectMany method and how it easily "flattens" nested, hierarchical data into a single, clean list!
Let's bring external data into your C# applications! We cover the absolute basics of reading text files using File.ReadAllText and File.ReadAllLines. Plus, discover why you should use a StreamReader for massive files to save memory, and why checking File.Exists is crucial for preventing app crashes.
Learn how to save your app's data, generate reports, and write logs! We break down the difference between WriteAllText (which overwrites everything) and AppendAllText (which adds to the end of a file). Plus, learn how to use StreamWriter for efficient line-by-line writing, and how to safely catch IOExceptions.
In this clip we explore the C# Path class and how it automatically handles cross-platform differences between Windows, Mac, and Linux. Learn how to safely join folders using Path.Combine, extract file extensions with GetExtension, and safely locate system directories using Environment.SpecialFolder.
Learn how to organize your file system using C#'s Directory class! We cover how to automatically create folders, move entire directory trees, and safely delete folders. Plus, see how to recursively search through subdirectories to find specific files and how to handle common permission errors using try-catch blocks.
Dealing with massive files? Don't load them all into memory at once! Learn how to use FileStream, StreamReader, and StreamWriter to process massive files sequentially. We cover how to handle raw binary bytes, read text line-by-line, and keep your application's memory footprint incredibly small.
CSV files are everywhere in data exchange! Learn how to read and write simple CSV files manually using File.ReadAllLines and Split. Then, discover why developers rely on the popular CsvHelper library to automatically map CSV rows into C# objects and handle tricky edge cases (like commas trapped inside quoted text).
JSON is the language of the modern web! Learn how to easily convert your C# objects into JSON strings (Serialization) and parse JSON text back into C# objects (Deserialization). We explore the modern, built-in System.Text.Json library, compare it to the classic Newtonsoft.Json, and show you how to safely handle JSON validation and async operations.
XML is still heavily used in enterprise integrations, configuration files, and legacy systems! We cover how to read, write, and manipulate XML data in C#. Discover why XDocument is the modern, LINQ-friendly choice for most tasks, and learn exactly when you should switch to XmlReader to stream massive XML files without blowing up your memory.
Want your app to instantly react when a file is created, modified, or deleted? Learn how to use C#'s FileSystemWatcher to monitor directories in real-time! We cover setting up event handlers, filtering for specific file types, and a crucial pro-tip: how to "debounce" events so your app doesn't crash during an event storm.
File operations can fail for dozens of reasons—missing files, restricted permissions, or even full hard drives! We'll show you how to write bulletproof C# code by using try-catch blocks to handle specific errors like FileNotFoundException, IOException, and UnauthorizedAccessException. Plus, learn why proactively checking File.Exists() is just as important as catching exceptions after they happen.
Go beyond the basic try-catch block! We take a fast-paced deep dive into advanced C# exception handling. Learn how to correctly order multiple catch blocks (from most specific to least specific) and ensure guaranteed resource cleanup using the finally block.
Stop writing the same exact code for different data types! In this quick C# guide, we break down Generics. Learn how to build flexible, type-safe classes and methods, how to apply Constraints (like where T : class) to enforce strict rules, and how generics secretly boost your application's performance by eliminating "boxing."
Want to pass a method as a parameter or trigger notifications across your app? In this quick guide, we break down C# Delegates (type-safe function pointers) and how to use the built-in Action, Func, and Predicate types. Plus, learn how to build decoupled applications using Events and the publish-subscribe pattern!
Never freeze your application's UI again! In this quick C# guide, we cover the essentials of asynchronous programming using async and await. Learn how to free up your main thread during heavy database or network calls, how to run multiple tasks simultaneously using Task.WhenAll, and the crucial reason why you must avoid using .Wait() or .Result.
Maximize your CPU's performance! We explore the Task Parallel Library (TPL) and show you how to run heavy, CPU-bound tasks simultaneously across multiple cores. Learn the difference between Parallel.For and standard loops, how to turbo-charge your LINQ queries with AsParallel(), and how to safely store multithreaded data using ConcurrentBag.
Make your code incredibly dynamic! First, we learn how to use Attributes (like [Obsolete]) to attach custom metadata to your classes and methods. Then, we dive into Reflection: the powerful C# feature that lets your application inspect its own code, read that metadata, and even invoke methods dynamically while the app is running!
Learn C# the fast way with 100 essential concepts delivered in 100 focused, one-minute lessons. This course takes you from complete beginner to confident C# developer through a structured, no-fluff approach.
What You'll Master:
Fundamentals (Concepts 1-25): Variables, data types, strings, math operations, Boolean logic, if statements, switch expressions, loops, arrays, and methods
Object-Oriented Programming (Concepts 26-40): Classes, constructors, properties, inheritance, polymorphism, interfaces, encapsulation, and method overloading
Collections & Data Structures (Concepts 41-55): Lists, Dictionaries, HashSets, Queues, Stacks, searching, sorting, and performance optimization
LINQ & Functional Programming (Concepts 56-70): Query syntax, method syntax, lambda expressions, filtering, grouping, joining, and aggregating data
File I/O & Serialization (Concepts 71-80): Reading/writing files, CSV processing, JSON/XML serialization, file system monitoring, and error handling
Advanced Features (Concepts 81-90): Exception handling, generics, delegates, async/await, Task Parallel Library, reflection, extension methods, pattern matching, and records
Best Practices (Concepts 91-100): Code organization, unit testing, Git, NuGet packages, configuration, logging, performance optimization, security, and design patterns
Each lesson is designed for maximum clarity and practical application. You'll see real code examples and understand exactly when and how to use each concept in your projects.
Perfect for:
Complete beginners starting their programming journey
Developers transitioning from other languages
Anyone who wants a quick, comprehensive C# reference
Start building real C# applications today with confidence and solid fundamentals!