Learn C# Programming (In Ten Easy Steps)
4.5 (505 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
3,916 students enrolled

Learn C# Programming (In Ten Easy Steps)

The simplest way to learn C# programming.
4.5 (505 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
3,916 students enrolled
Created by Huw Collingbourne
Last updated 8/2019
English [Auto]
Current price: $100.99 Original price: $144.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 7.5 hours on-demand video
  • 5 articles
  • 7 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Master C# programming concepts from the ground up
  • Use the source code examples to learn step-by-step
  • Understand the special features of C#: object orientation, the .NET framework, error-handling, serialization
Course content
Expand all 126 lectures 07:27:37
+ Step One - Getting Started
17 lectures 56:58

This course will teach you how to program the C# language on Microsoft Windows. This video gives you a quick overview of what to expect from the course.

Preview 03:11

This is the course text to download.

The Little Book Of C#
1.2 MB

This document contains links to useful downloads, sources of information and news of developments related to C# programming.

FAQ : Resources and Updates - Read This First!
6 pages
C# Code Archive

A summary of section One of this course

What's in Step 1?
If you don't already have a commercial copy of Microsoft Visual Studio, you can download a free copy of Visual Studio Community Edition – a powerful development environment that gives you everything you need to start C# coding today. This video explains how to get a free copy.
Preview 02:59

If you are a Visual Studio 2019 user, be sure to download and read this document before creating a project.

Visual Studio 2019

If you are impatient to get started, this video will guide you through all the steps from starting Visual Studio to running your program. Follow along to see how to design a user interface and write some simple C# code.  

Preview 05:05

How to create a user interface with Visual Studio

Adding components to a form

How to add code to respond to events

Adding program code

What you need to do to use the code in the archive

How to use the sample projects

This video explains some of the differences between editions of Visual Studio. It also explains how to customize the software by changing everything from the items on the menus to the formatting of your code.

How to customize Visual Studio

Familiarize yourself with the essential features of the Visual Studio environment such as the Design View, Code Editor, Properties and Events panels, Alignment Toolbar and Solution Explorer.

Tour of Visual Studio

You can follow this course on a Mac (or on Linux) using the free MonoDevelop IDE and Mono framework. Alternatively, you can run Visual Studio in a Virtual Machine, such as Parallels, on a Mac. 

Web links: 



Preview 01:37
This video provides guidance on downloading and installing the Mono framework and MonoDevelop IDE on OS X.
Install Mono and MonoDevelop on a Mac

This lecture explains how to load and run the Visual Studio solutions provided in the source code archive into MonoDevelop (or Xamarin Studio) on a Mac.

How to use the sample projects on OS X
MonoDevelop has a built-in visual designer that lets you drag and drop controls onto a form. It’s a bit like the WinForms designer in Visual Studio – but not quite. This video shows how to create a visual application from scratch on OS X.
How to create visual user interfaces with MonoDevelop
A chance to revise the basics
First Steps in C#
3 questions
+ Step Two - Programming Fundamentals
13 lectures 44:50

This is where I explain the essential features of the C# language: data types, variables, constants, functions, keywords, namespaces, type conversion and other important components of the language

Preview 02:03

Every piece the data in your programs has data type. That’s what this lesson is all about.

Data types

Here we look at how to assign data items to named variables.


While variables – whose values can be changed - are essential in programming, sometimes you may want to make sure that a value cannot be changed.


How to document your code.


C# defines a number of special words, keywords, that mean specific things to the language. 


A function is a named block of code that can be run by calling its name.


How to use code stored in other files.

Namespaces and usings

How to use some of the built-in routines to convert between data types.

Data type conversion

As well as using methods to convert between different types, you can ‘cast’ one type to another – with some restrictions.

Type casting

C# also allows you to declare and initialize local variables without specifying a type

Implicitly typed variables

Let’s now summarise some of the essential elements and syntax of C#. 

Summary of C# Languages Elements

How to program a simple calculator.

Sample program: Tax Calculator

How to assign values to variables and constants

Data types
3 questions
+ Step Three - Conditional Tests and Operators
16 lectures 50:45

How to run code only if some test condition is true.


How to run different bits of code when you test if something is or is not true.


How to run just one line of code after a test. And do curly brackets matter?

Single line statements with tests

How to make a second test if the first one fails.


If you need to perform a number of tests, it is often quicker to write them as ‘switch statements’.

Switch statements

Operators are special symbols that are used to do specific operations such as add¬ition, multiplication and concatenation.


The operators you need to do calculations in C#.

Arithmetic operators

How to compare two values.

Comparison operators

How to test If X is true AND Y is true. Or if either X OR Y is true.

Logical operators

Operators that do arithmetic and assignment in one go.

Compound assignment operators

The ++ and – operators.

Increment and decrement operators

What is the difference between ++a and a++?

Prefix and Postfix operators

How to handle the order in which tests are evaluated.

Parentheses and precedence

Multiple test conditions: good, bad or incomprehensible?

Complex tests

Let’s summarise what we’ve learnt about operators.

Summary of operators
How to test values to take different actions.
Tests and Conditions
3 questions
+ Step Four - Functions and Arguments
13 lectures 47:36

In this step I’m going to explain all about functions or methods and arguments

Preview 02:30

Here we look at functions: named blocks of code. 

What is a function?

Is a method the same as a function?

What is a method?

How to send data items to a function.

Arguments and parameters

How to return data from a function.

Return values

The different types of argument that you can use in C#. 

Arguments By Value, and By Reference

And one more argument type.

Out arguments

Multiple functions with the same name. How does that work?

Method overloading

Functions inside functions…

Local Functions

A sample program showing some of the concepts we’ve discussed

Sample program: TreeView

Download this PDF guide to learn more about the details of the TreeView sample project described in the previous lesson.

Guide to the TreeView project

Functions that call themselves.

Recursive functions

Let’s quickly revise what you’ve learnt in this step of the course.

Summary of functions

How to divide code into named blocks

Functions, methods and arguments
3 questions
+ Step Five - Object Orientation
13 lectures 01:15:08

This is where things start to get really interesting. Object Orientation.

Preview 03:35

What are classes and objects?

Object Oriented Programming explained

Create a blueprint for an object.

How to write a class definition

Create an object based on the class defined in the last lesson

How to create an object from a class

How to be sure an object has been created

Testing if an object exists

The Visual Studio refactoring tool

Visual Studio Refactoring

This is a hands-on guide to writing code to create a simple ‘family tree’ of related classes.

Creating class hierarchies

Visual Studio can automate the separation of classes into code files

Change to one class per file

Methods that create an object from a class

Preview 05:45

Keywords that change scope and visibility

Access modifiers: public, private, protected

Special types of method that access fields of an object


Does it matter what your call the things in your programs?

Naming conventions

Let’s quickly go over what we’ve learnt in this section.

Summary of Object Orientation

How to create and use objects

Object Orientation
3 questions
+ Step Six - Arrays and Strings
14 lectures 36:41

In this step we look at arrays, indexing and iteration. 

What is in Step 6?

Arrays – sequential collections of elements


How to count over list items in a loop

Iterating array items with a 'for' loop

You can create arrays of any type of object, strings, integers, doubles or even user-defined objects

Arrays of objects

Another common way of iterating over items in an array in C# is to use a foreach loop.

foreach loops

Strings can be treated as arrays of characters


Using ‘while’ loops to program a word counting utility

while loops

An alternative type of ‘while’ loop

do..while loops

A simple text editor that you can use as a basis for adding features such as our word counter tool

Sample Program: Text Editor

Strings in C# can be manipulated using built-in methods

String operations

There is another string-like class called StringBuilder that you need to be aware of


How to embed values into a format string

String Format

C# also lets you evaluate expressions right inside a string

String Interpolation

A quick overview of what we learnt about arrays and strings in this section

Summary of Arrays and Strings

Sequential lists of characters and other data types

Arrays and Strings
3 questions
+ Step Seven - Files, Folders and Input/Output
8 lectures 26:20

In step 7 we find out how to save and load files to and from a disk.

What is in Step 7?

How to test if a file exists, copy a file and display file information using static methods.

Basic File Operations

How to use methods to find information and do operations on your disk files and directories

Disk and file-handling methods

Streams provide numerous special routines for saving and loading data

Streaming data

How to save and load text data

Reading and writing text files

So what use is file handling in your own projects?

Using File-handling in your own programs

Some types of project that you might want to try to program on your own

Choosing a programming project

What you’ve learnt in this step

Summary of File Handling

Handling input and output in C#

Files and streams
3 questions
+ Step Eight - Classes, Methods, Structs and Enums
7 lectures 22:08

In this step we are coming back to take a closer look at classes and methods. 

What is in Step 8?

One class in several files – that’s a partial class

Partial classes

Some more variations on methods

Static and overloaded methods

Classes can be static too!

Static classes

How to use static and overloaded methods

Using static and overloaded methods

Structures and enumerated constants

Structs and enums

What we learnt in step 8…

Summary of Advanced classes and methods

Structures and enumerated constants

Structs and Enums
3 questions
+ Step Nine - Exception Handling and Debugging
9 lectures 27:10

What to do when programs go wrong

What is in Step 9?

To trap errors at runtime, you need to handle exceptions


You can catch more than one exception type in a try..catch block. Here I show how.

Catching different exception types

How to make sure that some code executes whether or not an exception is thrown

try .. catch .. finally

You can nest try..catch blocks to handle exceptions that occur in the catch block of an exception handler!

Nested exception handling

How to handle an exception only when a certain condition is met

Exception conditions

Step through your code and watch variables with Visual Studio

The Debugger

You can try out bits of C# code without having to write and compile an entire program using the C# interactive console. Here I show you how to get started with this.

The Interactive Console

The basics of error-handling and debugging

Summary of error handling

Finding and fixing errors

Exceptions and debugging
3 questions
+ Step Ten - Further Adventures in Programming
15 lectures 53:41

In the final step we look at collections and dictionaries – then start work on programming a game

What is in Step 10?

The .NET framework supplies strongly-typed ‘generic’ collection classes which comes with lots of useful methods to add, remove and locate objects in the collection. 

Generic Collections

Dictionaries are lists of values that can be indexed with a ‘key’ rather than a numeric index indication a position in the list.


C# lets you define ‘virtual’ methods that can be ‘overridden’ by methods of the same name in descendant classes. 

Overridden Methods

Let’s see how to use C# classes and techniques to write an exploring game

Write an adventure game

It may be a text-based game but it needs a graphical user interface!

The game user interface

Where did adventure games come from, anyway?

A brief history of adventure games

So how does the player interact with the game?

Playing the game

Now let’s look at the classes in my Adventure Game project. 

The game classes

How can we save and restore all those objects?

Saving and restoring games

Let’s see if how to use a Dictionary instead of a List to store the Room objects of the game.

Subclassing Dictionaries

Subclassed Dictionaries can be serialized. But you need to create a special constructor.

Serializing Dictionaries

In this step we covered collections and dictionaries. I explained virtual and overridden methods. And finally I provided a reasonably complicated sample project – an adventure game. 

Summary of Collections
More on lists and methods
Generics and overriding
3 questions

Well, that’s it. We’ve come to the end of the course. 

Course Wrapup
And finally...
  • Visual Studio (either the free Community edition or a commercial edition). We explain how to download and install this in the course.

Learn C# Programming (in ten easy steps) [Version 2] is suitable for beginner programmers or anyone with experience in another programming language who needs to learn C# from the ground up. Step-by-step it explains how to write C# code to develop Windows applications using either the free Visual Studio Community Edition or a commercial edition of Microsoft Visual Studio (it even explains how to write C# programs using free tools for OS X). This is the completely revised and updated second version of this course. 

C# is one of the most widely used an important of all modern programming languages. If you need to learn C# quickly and painlessly, this is the perfect course.

You will begin by learning the core features of programming – variables, constants, functions and data types. You will move on rapidly to learn about Object Orientation and the more advanced features of C# and the .NET framework such as file-handling, data-streaming, dealing with exceptions (errors) and overriding methods. Even if you start out as a complete beginner, by the end of this course you will have built a really solid foundation of programming knowledge and skills.

All the source code of sample projects is provided ready for you to download, run and modify. The course also includes an eBook that provides even more information on the topics being discussed. And there are also interactive quizzes to test your understanding of each major topic.

The course instructor, Huw Collingbourne, is Director of Technology with SapphireSteel Software, a company that specialises in Visual Studio development tools (written in C#) for professional programmers.

Learn C# Programming (in ten easy steps) is the fastest and simplest way to help you make the move from coding novice to professional programmer. The first version of this course was launched in 2012. The current version has been completely re-made and expanded with numerous new lessons. As an added bonus, the complete version 1 of the course (almost 4 additional hours of video instruction) is also included as a free download.

Who this course is for:
  • Beginners – if you’ve never coded before, you can learn C# step by step
  • Programmers switching to C# from some other language such as Ruby, Python, C or Java