The Complete C# and Object-Oriented Programming Course
4.1 (1,572 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.
13,308 students enrolled

The Complete C# and Object-Oriented Programming Course

The one and only course you need to learn C# 8 and object-oriented programming (C# From A To Z | Source Code Included)
4.1 (1,572 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.
13,308 students enrolled
Created by Ahmad Mohey
Last updated 8/2020
English [Auto]
Current price: $139.99 Original price: $199.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 23.5 hours on-demand video
  • 10 articles
  • 212 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
  • Install and work with Visual Studio 2019 (Windows and Mac)
  • Learn the fundamentals of programming using C# 7.2 and C# 8
  • Understand Iaas, PaaS, SaaS and Serverless
  • Work with Azure Functions
  • Working with nulls in C# 8
  • Working The New Asynchronous Streams
  • Understanding and working with positional patterns
  • Work with object-oriented programming (OOP) as a professional.
  • Master the classes and understand the different types of classes (static, abstract, partial, sealed and more).
  • Learn the structures and enumerations and how to use them.
  • The differences between classes and structs.
  • Learn to encrypt and decrypt your data using C#.
  • Understand Inheritance, Encapsulation, Polymorphism and Abstraction.
  • Get familiar with Composition, Aggregation and Association.
  • Understand the loops (For, Foreach, While and more).
  • Master the powerful lambda expressions.
  • Understand anonymous methods and how to create them.
  • How to manipulate strings (Replace, Remove, Insert, Substring and more).
  • Read and write files easily with C#.
  • Build caesar cipher (encryption and decryption) yourself.
  • Learn how to create different types of methods.
  • The difference between static and non-static methods.
  • How to use recursive methods.
  • How to use the extension methods.
  • Understand the difference between pass by reference and pass by value.
  • How to use optional and named arguments.
  • Work with arrays including multidimensional arrays and jagged arrays.
  • Get familiar with the advanced concepts (Multithreading, Recursing, Generics & many more).
  • Master the non-generics collections (ArrayLists, Hashtables, Stacks, Queues and more).
  • Master the generics collections (List<T>, dictionary<K,V>, SortedList<K,V> and more).
  • How to create generic classes, methods and arguments.
  • How to debug and find errors easily in your code.
  • Understand how stacks and queues work with real examples.
  • How to handle exceptions (Exception Handling).
  • How to use params keyword.
  • How to use Stopwatch class.
  • Understand how older tuples and new enhanced tuples work.
  • Learn how to use NuGet and install packages.
  • How to work with Delegates and Events.
  • Delegates vs direct methods call.
  • Work with Func, Action and Predicate delegates.
  • Learn how to use timers in C#.
  • Make your application speaks using SpeechSynthesizer.
  • Dynamic and Var keywords and differences between them.
  • How to use LINQ (Language-Integrated Query).
  • How to check C# version and how to change it.
  • Understand what is synchronous programming.
  • Understand what is asynchronous programming.
  • Differences between synchronous and asynchronous programming.
  • Learn multi-threading theory and create multi-threaded applications.
  • Understand deadlocks and how to solve them.
  • Understand lock keyword, Mutex, Monitor and Semaphores.
  • How to use tasks, manage them and even cancel them.
  • How to work with async and await keywords.
  • Understand what is Serialization and Deserialization and how to use them.
  • How to use attributes and create custom attributes.
  • Understand the preprocessor directives and how to use them.
  • Understand assemblies and versions.
  • Work efficiently and smoothly with Visual Studio 2017.
  • Work with comparison operators.
  • Learn how to create variables and convert their datatypes in different ways.
  • Understand how compilers work
  • Conditional statements (if and switch statements).
  • How to use DateTime and TimeSpan.
  • Understand the logical operators.
  • How to use arithmetic operators.
  • DLL files (Dynamic Link Libraries), How and why we use them.
  • How to decompile DLL files.
  • How to protect your DLL files.
  • Building new switch expressions
  • Using tuple like patterns on switch statements
  • Using property patterns to match on properties
  • Working with new range operator
  • Using hat operator
Course content
Expand all 293 lectures 23:38:18
+ The Fundamentals of C# Programming - Part 1
19 lectures 01:23:17

Introduction to The Course.

Preview 01:51
Important Before You Start | The Course Guide

Introduction to the chapter to present what we are going to discuss next.

Introduction to The Chapter

In this important lecture we need to set a solid understanding of the different types of programming languages.

Preview 06:49

You need to learn another important concept in the world of computer science before you start learn more about programming...which is the compiler.

Preview 03:05

In this article you will see how compilers actually work in details.

How Compilers Work

C# is a very powerful programming language and can be used to deliver different types of applications, let us see what can you do with C#.

What C# Can Do?

In this lecture you will be installing the latest edition of Visual Studio which is 2019 Preview For Window.

Install Visual Studio 2019 Preview For Windows

In this lecture you will be installing the latest edition of Visual Studio which is 2019 Preview For Mac.

Install Visual Studio 2019 Preview For Mac

Visual Studio 2019 Preview is out there, in this lecture we are going to check it out and create our first .Net Core console app.

Walk-through Visual Studio 2019 Preview
What is .Net Core? (Article)

Explaining what are variables and what are the common data types (integer, decimal, double, char, string).

Data Types and Variables - Part 1

How to work with string variables.

Data Types and Variables - Part 2

How to work with boolean (true or false) variables.

Data Types and Variables - Part 3

How to convert one type of data to another type in different ways.

Casting and Type Conversion

How to use comments in different ways.


See how to use var keyword instead of all the data types.

Var Keyword
History About C# Language

Summing up what we have been discussing in this chapter.


The Fundamentals of C# Programming - Part 1 - Quiz

Chapter One Quiz
8 questions
+ The Fundamentals of C# Programming - Part 2
19 lectures 01:36:46

Introduction to the chapter to present what we are going to discuss next.

Introduction to The Chapter

Dive deeper into integer datatypes, the limits and the sizes and more.

Preview 07:52

Explaining the difference between the double, float and decimal datatypes.

Float, Double and Decimal

How to work with DateTime and display it in different formats and even custom formats.


Exercise No 01 - Test your knowledge of DateTime.  

DateTime Exercise

Discuses the different error types such as Syntax Error and Run-time Error (Exceptions).

Error Types

Explaining the different worldwide naming convention and why to use it.

Naming Conventions

Learn how to take inputs from the user using ReadLine method.


How to do basic arithmetic operations (addition, subtraction, multiplication, division and remainder) .

Arithmetic Operators

Exercise No 02 - Test your knowledge of arithmetic operators.

Arithmetic Operators Exercise

Learn the order in which operations are performed when an expression is evaluated.

Precedence of Operators

Explaining how if and else statements work, to ask if a condition is proven true to apply some function or not.

Conditional Statements - if

Explaining how switch statement works, almost acting as an if statement but with a different technique.

Conditional Statements - switch

How to do comparisons (equal, not equal, greater than, greater than or equal, less than and less than or equal).

Comparison Operators

Understand how logical operators (and, or and not) work, they typically used with Boolean values.

Preview 10:54

Combine many logical operators together to perform a real world scenario such as Username or Email and password scenario.

More Logical Operators

Exercise No 03 - Test your logical thinking with this exercise.

Even or Odd Exercise
Assignments (1,2,3)

Summing up what we have been discussing in this chapter.


The Fundamentals of C# Programming - Part 2 - Quiz

Chapter Two Quiz
11 questions
+ The Fundamentals of C# Programming - Part 3
19 lectures 01:26:40

Introduction to the chapter to present what we are going to discuss next.

Introduction to The Chapter

Explaining how TryParse work and why it is safer than the direct Parse and also how to use the out keyword.

Preview 05:23

By using const keyword we can create variables that does not change over the life of the program.


If you got bored of the look of command prompt let's see how can we change background color, font size and font color.

Command Prompt

How to use the powerful functions to manipulate a strings such as Trim, toUpper, toLower and Replace.

String Manipulation - Part 1

Continuing the manipulation of strings we are going to use Substring, remove, Insert, IndexOf and LastIndexOf.

String Manipulation - Part 2

Exercise No 04 - Test your knowledge of string functions.

String Manipulation Exercise

Consisting of a backslash (\) followed by a letter or by a combination of digits are called "escape sequences." To represent a newline character, single quotation mark and many others.

Escape Sequences

String Interpolation is the way that placeholders in a string are replaced by the value of a string variable, it was introduced in c# 6.

String Interpolation

Learn how to work with for loops, The for loop executes a block of statements repeatedly until the specified condition returns false.

Loops - Part 1 (For Loop)

Learn how to work with different looping technique the While and Do while.

Loops - Part 2 (While Loop and Do While Loop)

Now we are going to see how to place a for loop inside another for loop, this technique called nested loops.

Loops - Part 3 (Nested Loops)

Exercise No 05 - Test your knowledge of loops.

Loops Exercise

Math class provide us with the common mathematical functions such as Ceiling, floor, round and truncate.

Math - Part 1

Continue exploring the Math class functions and properties in this lecture we have Max, min, pow, sqrt and PI.

Math - Part 2

In this lecture we are going to see how to generate random numbers something like dice maybe or any other example.

Random Numbers

Arrays can stores a collection of elements of the same type, In this lecture we are going to see how to use arrays.

Assignments (4,5,6)

Summing up what we have been discussing in this chapter.


The Fundamentals of C# Programming - Part 3 - Quiz

Chapter Three Quiz
17 questions
+ Object-oriented Programming in C# - Part 1
21 lectures 01:50:46

Introduction to the chapter to present what we are going to discuss next.

Introduction to The Chapter

Now it is time to explore the basic concepts of object-oriented programming.

Object-oriented Programming

A method is a code block that contains a series of statements. In this lecture we are going to see how to create methods in C#.

Methods - Part 1 (The Basics)

Continue our discussion about methods now let's see how can we add parameters and return a value from a method.

Methods - Part 2 (Parameters and Return Type)

Exercise No 06 - Test your knowledge of basic methods.

Simple Method Exercise

Learn the difference between pass by reference vs pass by value (ref keyword and out keyword.

Methods - Part 3 (Value vs Reference)

Learn the rules for creating methods with the same name.

Preview 04:17

Exercise No 07 - Test your knowledge of overloaded methods.

Overloaded Methods Exercise

A class is a construct that enables you to create your own custom types by grouping together variables of other types, methods and events. A class is like a blueprint.


Constructors have the same name as the class or struct, and they usually initialize the data members of the new object.


In this lecture we are going to see how can we explore the different classes and structs through visual studio.

DateTime Exploration

Explaining how can we use static methods and what is the need to use static methods.

Static Methods

The scope of a variable determines its visibility to the rest of a program.


The first of the four pillars of OOP which enables you to create new classes that reuse, extend, and modify the behavior that is defined in other classes.


Encapsulation is used to prevent or allow access to its members from outside classes using public, private, protected, internal modifiers.


Exercise No 08 - Test your knowledge of inheritance.

Vehicle Inheritance Exercise

Polymorphism is often referred to as the third pillar of OOP, after encapsulation and inheritance, Polymorphism is a Greek word that means "many-shaped".


Applying the concept of abstraction by making classes not associated with any specific instance.


Exercise No 09 - Test your knowledge of object-oriented programming.

Cars Exercise

#region lets you specify a block of code that you can expand or collapse when using the outlining feature of the Visual Studio.

Region Keyword

Summing up what we have been discussing in this chapter.


Object-oriented Programming in C# - Part 1 - Quiz

Chapter Four Quiz
20 questions
+ Object-oriented Programming in C# - Part 2
22 lectures 01:46:01

Introduction to the chapter to present what we are going to discuss next.

Introduction to The Chapter

Sealed modifier prevents other classes from inheriting from it.

Preview 02:13

Static class cannot be instantiated. You cannot use the new keyword to create instances. you access the members of a static class by using the class name itself.

Static Classes

A type defined within a class or struct is called a nested type.

Nested Classes

It is possible to split the definition of a class over two or more source files. Each source file contains a section of the type or method definition, and all parts are combined when the application is compiled.

Partial Classes

Namespaces are used to provide a "named space" in which your application resides. They're used especially to provide the C# compiler a context for all the named information in your program, such as variable names.


Struct is a value type that is typically used to encapsulate small groups of related variables, such as the coordinates of a rectangle or the characteristics of an item in an inventory.


In this lecture we are going to see the differences between classes and structs.

Classes VS Structs

The enum keyword is used to declare an enumeration, a distinct type that consists of a set of named constants called the enumerator list.


Exercise No 10 

Country Exercise
Country Exercise Solution - Part 1
Country Exercise Solution - Part 2

The this keyword refers to the current instance of the class.

This keyword

An interface contains definitions for a group of related functionalities that a class or a struct can implement..


Interfaces are similar to abstract classes, But there is some differences in this lecture we are going to explore them.

Interfaces VS Abstract Classes

An exception is a problem that arises during the execution of a program, In this lecture we are going to see how to handle them.

Exception Handling

Exercise No 11 - Test your exception handling skills

Exception Exercise

Understand the concept of composition.


Understand the concept of aggregation.


Understand the concept of association.

Assignments (7,8)

Summing up what we have been discussing in this chapter.


Object-oriented Programming in C# - Part 2 - Quiz

Chapter Five Quiz
21 questions
+ Advanced C# - Part 1
20 lectures 01:37:27

Introduction to the chapter to present what we are going to discuss next.

Introduction to The Chapter

The .NET Framework is an application development platform that provides services for building, deploying, and running desktop, web, and mobile applications .

.NET Framework

In this lecture we are going to see how to use Visual Studio Debugger to trace variables and get more important while the application is running.


Debug.WriteLine almost work as Console.WriteLine but there is a difference lets discover it.


In this lecture we are going to see the difference between Build, Rebuild and Clean options in the visual studio.

Build, Rebuild and Clean

string is an alias for the class String and int is an alias for the class Int32.

string VS String

Learn how to add documentations and descriptions to your code including (classes, methods and more).


Code snippets are ready-made snippets of code you can quickly insert into your code.

Preview 05:21

Learn how to create your own custom snippets in visual studio.

Custom Snippets

How to use StreamWriter to write files.

Files : Write

How to use StreamReader to read files.

Files : Read

Exercise No 12 - Test your working with files skills.

File Creator Exercise

Understand basics of cryptography and the concepts of Encryption and decryption.

Introduction to Cryptography

Learn how to use DES encryption technique in C#.

Cryptography in C#

Exercise No 13 - Test your cryptography skills.

Caesar Cipher Exercise

Let do something fun and and learn how to change colors of the texts displayed in command prompt.

Console Colors

Digit separator character, represented by single underscore ( _ ). This separator can be used within any numeric literal ,to improve readability of numbers.

Digit Separator

Default keyword is used to initialize generic types either to null or 0 depending on if it is a reference or value type.

Default Keyword
Assignments (9,10)

Summing up what we have been discussing in this chapter.


Advanced C# - Part 1 - Quiz

Chapter Six Quiz
13 questions
+ Advanced C# - Part 2
31 lectures 03:46:41

Introduction to the chapter to present what we are going to discuss next.

Introduction to The Chapter

In C# we have two types of collections Generic and Non-Generic, Get ready to understand the differences..

Introduction to Collections

ArrayLists implements the IList interface using an array whose size is dynamically increased as required. Arraylists makes working with arrays much much easier.

Preview 20:54

Represents a collection of key/value pairs that are organized based on the hash code of the key.

Non-generic Hashtable

Represents a collection of key/value pairs that are sorted by the keys and are accessible by key and by index.

Non-generic SortedList

Represents a simple last-in-first-out (LIFO) non-generic collection of objects.

Non-generic Stack

Represents a first-in, first-out (FIFO) non-generic collection of objects.

Non-generic Queue

Manages a compact array of bit values, which are represented as Booleans, where true indicates that the bit is on (1) and false indicates the bit is off (0)..

Non-generic BitArray

Exercise No 14 - Test your knowledge of structs and ArrayLists.

List of Animals and Trainers Exercise

Represents a list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists. we can say that is is corresponding to the non-generic collection ArrayList.

Generic List <T>

Represents a generic collection of keys and values.

Generic Dictionary

Represents a generic collection of key/value pairs that are sorted by key.

Generic SortedList

Represents a generic collection of key/value pairs that are sorted on the key. The difference between SortedList and SortedDictionary is the performance.

Generic SortedDictionary

Represents a variable size last-in-first-out (LIFO) generic collection of instances of the same specified type.

Generic Stack

Represents a variable size first-in-first-out (FIFO) generic collection of instances of the same specified type.

Generic Queue

Defines a key/value pair that can be set or retrieved.


Represents a collection of associated String keys and String values that can be accessed either with the key or with the index, NameValueCollection can contains duplicate keys while the Dictionary cannot. Dictionary will be much faster.


Exercise No 15 - Test your generic collections skills.

List of Animals Exercise

Generic classes encapsulate operations that are not specific to a particular data type, Let's see how can we create our own generic classes.

Generic Classes

Exercise No 16 - Test your generic classes skills.

Generic Exercise - Part 1
Generic Exercise - Part 2

Tuple is a data structure that comprises of an ordered, heterogeneous collection of “n” elements, In this lecture we are going to discuss the older way of creating and using tuples.


How to expand the limit of tuples by placing tuple inside a tuple.

Nested Tuples

Tuples can be used with methods to return more than one value from a method.

Tuples with Methods

Exercise No 17 - Test your knowledge of Tuples.

Tuples Exercise

Now we are going to see how to use the new value tuples introduced in C# 7, Which is much easier and more powerful.

Value Tuples

Learn how to place a value tuple inside another value tuple.

Nested Value Tuples

Value tuples can be used with methods to return more than one value from a method.

Value Tuples with Methods

Exercise No 18 - Test your value tuples skills.

Value Tuples Exercise
Assignments (11, 12, 13, 14, 15)

Summing up what we have been discussing in this chapter.


Advanced C# - Part 2 - Quiz

Chapter Seven Quiz
13 questions
+ Advanced C# - Part 3
32 lectures 01:59:37

Introduction to the chapter to present what we are going to discuss next.

Introduction to The Chapter

Recursive method calls itself so many times until a specific condition happens. Recursive method has parameter(s) and calls itself with new parameter values each time.

Preview 05:20

Exercise No 19 - Test your recursive methods skills.

Recursive Methods Exercise

Optional arguments allow method parameters to be optional, to be passed or not.

Optional Arguments

Named arguments enable you to specify an argument for a particular parameter by the parameter's name rather than with the parameter's position in the parameter list.

Named Arguments

In a generic type, a type parameters is a placeholder for a specific type that a user specifies when they instantiate a variable of the generic type.

Generic Arguments

By using the params keyword, you can specify a method parameter that takes a variable number of arguments.

Params Keyword

Exercise No 20 - Test your knowledge of params keyword.

Params Exercise

Local functions are private methods of a type that are nested in another member. They can only be called from their containing member.

Local Functions or Nested Functions

Extension methods enable you to "add" methods to existing types without creating a new derived type, recompiling, or otherwise modifying the original type.

Extension Methods

Exercise No 21 - Test your extension methods skills.

Extension Method Exercise

Stopwatch class provides a set of methods and properties that you can use to accurately measure elapsed time.


A delegate is a type that represents references to methods with a particular parameter list and return type.


How to get information about method and method parameters assigned to a delegate.

More About Delegates

Now let see the difference in the performance of delegates and methods.

Delegates VS Method Calls

Exercise No 22 - Test your delegates skills.

Delegates Exercise

A useful property of delegate objects is that multiple objects can be assigned to one delegate instance by using the + operator.

Delegate Multicast

A delegate can define its own type parameters. Code that references the generic delegate can specify the type argument to create a closed constructed type, just like when instantiating a generic class.

Generic Delegates

An anonymous function is an "inline" statement or expression that can be used wherever a delegate type is expected, Simply we can say that anonymous method is a method without a name.

Anonymous Methods

A lambda expression is an anonymous function that you can use to create delegates or expression tree types.

Lambda Expressions

Learn how to use lambda expressions with a generic list.

Lambda Expressions with Generic List

Func is a generic delegate. It has zero or more input parameters and one out parameter. The last parameter is considered as an out parameter.

Generic Delegate : Func

Action is also a generic delegate. An Action type delegate is the same as Func delegate except that the Action delegate doesn't return a value.

Generic Delegate : Action

Represents the method that defines a set of criteria and determines whether the specified object meets those criteria or not.

Generic Delegate : Predicate

In this lecture we will see how to use Func with anonymous method and lambda expression.

Func with Anonymous Method & Lambda Expression

In this lecture we will see how to use Action with anonymous method and lambda expression.

Action with Anonymous Method & Lambda Expression

Events enable a class or object to notify other classes or objects when something of interest occurs. The class that sends (or raises) the event is called the publisher and the classes that receive (or handle) the event are called subscribers.


Continue our discussion about delegates in this lecture we are going to see a more complex example of events.

More Events

Generates an event after a set interval, with an option to generate recurring events.


Expression body definitions let you provide a member's implementation in a very concise, readable form.

Expression-bodied Members
Assignments (16,17,18)

Summing up what we have been discussing in this chapter.


Advanced C# - Part 3 - Quiz

Chapter Eight Quiz
20 questions
+ Advanced C# - Part 4
37 lectures 02:12:43

Introduction to the chapter to present what we are going to discuss next.

Introduction to The Chapter

Nullable types can represent all the values of an underlying type, and an additional null value.

Preview 05:33

The conditional operator (?:) returns one of two values depending on the value of a Boolean expression.

Conditional Operator (Ternary Operator)

Exercise No 23 - Test your conditional operator skills. 

Conditional Operator Exercise

Used to test for null before performing a member access.

Safe Navigation Operator

LINQ (Language Integrated Query) is a Microsoft programming model and methodology that essentially adds formal query capabilities into Microsoft .NET-based programming languages. LINQ offers a compact, expressive, and intelligible syntax for manipulating data.

Introduction to LINQ

One of the ways to use LINQ queries in the method syntax, In this lecture we are going to see how to use LINQ in method syntax.

LINQ Method Syntax

Exercise No 24 - Test your LINQ method syntax skills.

LINQ Method Syntax Exercise

Now let's see another way to use LINQ queries which is the query syntax.

LINQ Query Syntax

Exercise No 25 - Test your knowledge of LINQ query syntax.

LINQ Query Syntax Exercise

LINQ can perform a lot of query function in this lecture we will see how to sort data in many ways.

Sorting Data Using LINQ

In this lecture we are going to see how to return a query from a method as a return value.

LINQ Queries with Methods

A TimeSpan object represents a time interval. The TimeSpan structure can also be used to represent the time of day, but only if the time is unrelated to a particular date.


Multithreading is the ability of a CPU or a single core in a multi-core processor to execute multiple processes or threads concurrently.

Introduction to Multithreading

In this lecture we are going to see how to create multiple threads and assign each of them to perform a specific task.

Creating Threads

In this lecture we are going to see how Sleeps, Abort and Join methods work.

Managing Threads

Exercise No 26 - Test your multithreading skills.

Thread Exercise 1

Exercise No 27 - Test your multithreading skills.

Thread Exercise 2

Article on Multithreading

Multithreading (Article)

Now let's go ahead create a multithreaded application, which contains different threads performing in harmony to achieve some tasks.

Multithreaded Applications

The ParameterizedThreadStart delegate allows us to send parameters to a thread but supports only a single parameter. If we need to send more we can use an array, a list or a tuple.


Deadlock simply is when two or more threads are waiting for each others to finish and none of them making it to completion is called as a deadlock , lock keyword in C# can help in this situation.

Deadlocks and Lock Keyword

Provides a mechanism that synchronizes access to objects.

Monitor Class

A synchronization primitive that can also be used for interprocess synchronization.


Limits the number of threads that can access a resource or pool of resources concurrently.


In this lecture we are going to see the what is asynchronous programming and the difference between asynchronous programming and synchronous programming and how both of them really work.

Introduction to Asynchronous Programming

Tasks simply represents an asynchronous operation.


We can pass parameters to tasks in plenty of ways, In this lecture we are going to explore them.

Passing Parameters to Tasks

We can also return a value from task, In this lecture we are going to see how to do that.

Tasks with Return Value

We have the capability to check the status of a task, Some of the members that are available for us are (Canceled, Created, RanToCompletion, Running and more).

Checking Tasks Status

We have the option to cancel a task while it is running using CancellationTokenSource and CancellationToken.

Cancelling Tasks

Now we will see how to use method Wait to wait for tasks to Waits for the Task to complete execution.

Waiting for Tasks

The Run method allows you to create and execute a task in a single method call and is a simpler alternative to the StartNew method.

Task Run

The Async and Await keywords are the heart of async programming. By using those two keywords, you can create an asynchronous method almost as easily as you create a synchronous method.

Async and Await

The concurrent collections provides several thread-safe collection classes that should be used in place of the corresponding types in the System.Collections and System.Collections.Generic namespaces whenever multiple threads are accessing the collection concurrently.

Concurrent Collections (ConcurrentBag)
Assignments (19,20,21,22)

Summing up what we have been discussing in this chapter.


Advanced C# - Part 4 - Quiz

Chapter Nine Quiz
16 questions
+ Advanced C# - Part 5
37 lectures 02:36:29

Introduction to the chapter to present what we are going to discuss next.

Introduction to The Chapter

Provides access to the functionality of an installed speech synthesis engine.


Exercise No 28 - Test SpeechSynthesizer skills.

Speak Method Exercise

We can use Process.Start method in the System.Diagnostics namespace to start any process like notepad, calculator or even visual studio itself.

Starting and Stopping a Process

Exercise No 29 - Test your knowledge of how to create a process.

Notepad Exercise

Arrays can have more than one dimension. In this lecture we are going to create two dimensional array.

Preview 09:31

Exercise No 30 - Test your multi-dimensional arrays skills.

Multidimensional Arrays Exercise

Jagged array is different than the multidimensional array, Jagged array is an array whose elements are arrays. So we can say it is an array of arrays.

Jagged Arrays

Exercise No 31 - Test your advanced arrays skills.

Jagged Array of Multidimensional Arrays Exercise

Indexers allow instances of a class or struct to be indexed just like arrays.


The dynamic type enables the operations in which it occurs to bypass compile-time type checking. Instead, these operations are resolved at run-time.

Dynamic Keyword

In this lecture we are going to explore the differences between var keyword and the dynamic keyword.

Var vs Dynamic

The readonly keyword is different from the const keyword. A const field can only be initialized at the declaration of the field. A readonly field can be initialized either at the declaration or in a constructor.


The using static directive designates a type whose static members you can access without specifying a type name.

Static Directives

The preprocessor directives give instruction to the compiler to preprocess the information before actual compilation starts.

Preprocessor Directives

One of the very easy methods to use to indicates whether the specified string is null or an empty.


Destructors are opposite of constructors they are used to destruct instances of classes.


The using statement ensures that Dispose is called even if an exception occurs while you are calling methods on the object.

Using Statement

An assembly is a collection of types and resources that forms a logical unit of functionality. All types in the .NET Framework must exist in assemblies.


Provides information about a specific culture. The information includes the names (English name and native name) for the culture, the writing system, the calendar used, the sort order of strings, and formatting for dates and numbers.


Represents the version number of an assembly, operating system, or the common language run-time. There are four keys to define version (Build, Major, Minor, Revision).


Contains information about the country/region. Unlike the CultureInfo class, the RegionInfo class does not represent user preferences and does not depend on the user's language or culture.


Attributes provide a powerful method of associating metadata, or declarative information, with code (assemblies, types, methods, properties, and so forth).


Custom attributes are essentially traditional classes that derive directly or indirectly from System.Attribute. Just like traditional classes, custom attributes contain methods that store and retrieve data.

Custom Attributes

If you are using attributes in your code, reflection enables you to access them.


Serialization is the process of converting an object into a stream of bytes in order to store the object or transmit it to memory, a database, or a file. Its main purpose is to save the state of an object in order to be able to recreate it when needed. The reverse process is called deserialization.

Serialization and Deserialization

A GUID is a 128-bit integer (16 bytes) that can be used across all computers and networks wherever a unique identifier is required. Such an identifier has a very low probability of being duplicated.


StringBuilder class represents a mutable string of characters with a lot of powerful methods ready to use.


Patterns test that a value is a specific type, There are plenty of ways to work with pattern matching in C#.

Pattern Matching

A reference return value allows a method to return a reference to an object, rather than a value, back to a caller.

Ref Return or Ref Local

IEnumerable is the base interface for all non-generic collections that can be enumerated.

IEnumerable and IEnumerator

You use a yield return statement to return each element one at a time.

Yield Keyword

A DLL (Dynamic Link Library) is a library that contains code and data that can be used by more than one program at the same time.

DLL Files

Decompilation is a type of reverse engineering that does the opposite of what a compiler does.

Decompile DLL Files

There is plenty of ways to protect your DLL files. In this lecture we are going to use a third party tool to obfuscate a DLLfile.

Protect DLL Files
Assignments (23,24)

Summing up what we have been discussing in this chapter.


Advanced C# - Part 5 - Quiz

Chapter Ten Quiz
15 questions
  • Visual Studio Community (The free edition of Visual Studio)

[Update C# 8]

The next major version of C# is officially released which is C# 8.0. We were expecting it for quite some time, we had the chance to learn all the minor features and enhancements included in C# 7.1, 7.2 and 7.3, and I can say I am quite excited about the new capabilities Microsoft keep adding to C#.

In chapter 11 we will be discussing the new features and enhancements of C# 8 with easy to follow examples to make you understand what each feature is about.


Hello and welcome to The Complete C# and Object-Oriented Programming Course, The one and only course you will need to learn C# and object-oriented programming. This is more like a collection of many courses brought together to help you learn C# and how to use it efficiently. This course is by far the most comprehensive and effective on the market. Here's why:

  • The course will teach you almost everything you need to know regarding the powerful C# language.

  • This course start with you from zero experience in programming and starts to level up to the object-oriented programming till you reach the advanced concepts and topics of C# (Asynchronous Programming, LINQ,Generics, Collections, Delegates and more).

  • It will help you learn any programming languages other than C# later, because the course discusses almost every programming concepts and of course how to implement it in C#.

  • You will experience more than 200 examples30 exercises, 24 assignments and over 150 quiz questions.

  • You will learn about the new features in C# (7.1 - 7.2 - 7.3 and 8) like Enhanced tuples, out variables, local functions, expression bodied members, pattern matching and other more features.

  • This course will cover different encryption and decryption methods, plus explaining the theory of cryptography.

  • You will be very familiar with Visual Studio and many of its features like snippets and how to use them and even create custom snippets.

  • You will learn about real world staff like naming conventions, the small little differences between data types, terminologies, programming concepts and more.

  • Understand the advanced concepts such as multithreading, the synchronous and asynchronous programming.

  • Get familiar with the .Net framework structure and understand is the .Net framework

  • Learn the history of C# language and differences between each version of C#.

  • Learn how to work like professionals.

What other students who have taken this course say:

"I enjoyed the course. It's comprehensive and covers most of everything you'd want to know about C# and .NET. There's plenty of exercises and assignments in the course to help reinforce lessons. The course could be improved with the addition of a course project, but the instructor has assured that there will be another course forthcoming that will cover this. I recommend this course for anyone who wants to learn more about C# and the .NET framework."

"I am about 1/4 throught this course, and i have to say its brilliant. I have tried to learn how to program with many different languages using may different courses on udemy and have given up either because the course moved to fast or was to technical for me to understand. However this course is fantastic the material presented is very easy to digest and very informative while still engaging. So far i have learnt about using build in metods such as DateTime methods for my programs, creating and useing classes using inheritance, encapsulation and polymorphism. The course progresses on a nice incline in difficulty to test you on what you have just learnt and it has coding exercises, assignments and also quizes to test yourself with. The instructor is also very friendly and is quick to answer your questions with a good level of detail. I would recommend this course for anyone wanting to learn c# or learn how to program in general using c# as a first language."

"This course clearly covered the topics to understanding the language from a first-steps approach. I highly recommend to anyone who wishes to learn the language and requires a video tutorial with enough exercises. -- Thanks Ahmad"

"I've enrolled in countless other C# courses on UDEMY but always end up either getting bored or end up getting confused. In this course so far, the course has assignments which keep it fun for me, plus it cover all topics clearly to prevent me from getting confused. Thank You."

"The course is comprehensive and well explained, undoubtedly the author knows what he is talking about and is pretty experienced with this kind of topics.Examples were short enough to make obvious what each pattern is all about. Author points out issues in different approaches and provides a solution.Never seen these kind of explanations before...Overall I find this course excellent"

"Great course!! The instructor has comprehensive knowledge about the C# language and is able to present the programming concepts and paradigms in a way that is easily understandable.The presentation is very detailed and concise which is greatly appreciated.I feel ready to implement the knowledge gained"

Students also said that this course was:

  • Comprehensive Curriculum

  • Friendly

  • Direct & To-the-point

Get ready to start a journey of 20+ hours of C#, 20+ hours will make you a C# guru. 

So what are you waiting for....let's start!

Who this course is for:
  • Complete beginners, no prior experience is required.
  • Developers switching from other languages.
  • Programmers who are not feeling confident about their programming skills.
  • People who are looking for a career change.
  • Students looking for a course to refresh and incredibly increase their knowledge.
  • If you want to take only one course to learn everything to be C# developer.