Ultimate C# Masterclass - The Complete List of Topics
Ultimate C# Masterclass - The Complete List of Topics
C# Fundamentals
Our first C# program
● How to create C# projects
● What IDE is
● What comments are
● How to print messages to the console
● How to configure the options of Visual Studio
Variables
● What variables are
● What int and string types are
● What the variable’s declaration and initialization are, and what the difference between
them is
● The shortcut that duplicates a line of code
Naming variables & introduction to clean code
● How to name variables
● What reserved keywords are, and how to use them as variable names
● Why clean code is important
● Shortcut for renaming elements in code
Operators
● The most basic C# operators ( +, -, *, /, + +, - - )
● What operators precedence is
User input
● How to read user input from the console
● What code snippets are
● What the role of warnings is
Comments
● How to add single-line and multiline comments to our code
● Shortcuts for commenting and uncommenting the code
● How to write in multiple lines at once
Scope
● What scopes are
● Where particular variables can be used and where they can not
● What code blocks are
● What nested if statements are
Methods - part 3 - parameters types and the return type. Static typing in C#
● The difference between statically and dynamically typed programming languages
● How to use the correct types of method parameters and the return type
● The difference between runtime errors and compilation errors
String interpolation
● What string interpolation is, and how to use it
Switch statement
● What switch statements are
● One of the purposes of the default keyword
● What expressions are
Char
● What chars are
Do-while loop
● How to define a do-while loop
● The difference between the while and the do-while loops
For loop
● How to define a for loop
Break
● The purpose of the break keyword
Continue
● The purpose of the continue keyword
Nested loops
● What nested loops are
Loops performance
● What the performance of a program is
● How loops can affect the program’s performance
● What we can do to avoid performance degradation when using loops
Arrays
● What arrays are
● The purpose of the index from end operator (^)
● How to easily fill a new array with items using the array initializer
● What the greatest disadvantage of arrays is
Multi-dimensional arrays
● What multi-dimensional arrays are
Foreach loop
● How to use the foreach loop
Lists
● What Lists are
● The difference between Lists and arrays
● The most crucial methods we can use with Lists
“out” keyword
● The purpose of the out keyword
TryParse method
● How to parse a string to an int without the risk of a runtime error
● The keyboard shortcut for formatting the code
Abstraction
● What abstraction is
● The benefits of hiding the implementation details from the users of a class
Data hiding
● What data hiding is and why using it is a good idea
● What members of a class are
● What access modifiers are
● Public and private access modifiers
● What the default access modifier for fields is
Custom constructor
● How to define custom constructors in a class
● What the recommended naming for fields is
Methods in classes
● How to define methods in classes
● How methods should be named
● The rule of thumb we can use to find out what the default access modifiers in C# are
Encapsulation
● What encapsulation is
● How is encapsulation different from data hiding
● The benefits of using encapsulation
Methods overloading
● What methods overloading is
● What rules we must follow when defining many methods with the same name in a class
● How to quickly create a constructor using Visual Studio
Optional parameters
● How to define optional parameters
● How to set the default value of a parameter
Properties
● What properties are
● What a backing field of a property is
● What accessors are
● What the differences between fields and properties are
● When should we use fields, and when properties
Object initializer
● What object initializers are
● The purpose of the init accessor
Computed properties
● How to create computed properties
● When to use parameterless methods, and when computed properties
Inheritance
● What inheritance is
● What kind of relationship it creates between types
● What base classes and derived classes are
Overriding members from the base class. Virtual methods and properties
● How to override the implementation of the method or a property from a base class in the
derived classes
● What virtual methods and properties are
● What method hiding is
Implicit conversion
● What implicit conversion is
● New types: decimal and double
Explicit conversion
● What explicit conversion is
● What problems may it cause
“is” operator
● The purpose of the “is” operator
Null
● What null is
“as” operator
● The purpose of the “as” operator
● “as” operator limitations
● The difference between conversion with the cast expression, and with the “as” operator
Abstract classes
● How to prevent a class from being instantiated
● What abstract classes are
Abstract methods
● What abstract methods and properties are
Extension methods
● How to define extension methods
● How to create multiline string literals
JSON
● What JSON and XML are
● How to serialize a C# object to JSON format, and how to deserialize JSON string to a c#
object
● How to escape the quote character in a string
Exception object
● What exceptions are
● What the System.Exception class is and what data it contains
● How to see detailed information about an exception that occurred in our code
Stack trace
● What stack trace is and how it is useful
● Why unhandled exceptions are bad news
Precise exceptions
● Why it is important to be precise when using exceptions
● Why in most cases, we should avoid throwing and catching the base SystemException
type.
Exception filters
● What exception filters are
● How exception filters can let us better control what exceptions will be processed by a
catch block
Custom exceptions
● How to define custom exceptions
Simplified List
● How to implement a simplified List
Tuples
● How to define generic types in practice
● How to implement a custom tuple
● How to use build-in tuples
Generic methods
● How to define generic methods
● How the compiler infers the type parameter from the context in which some method is
used
Improving the performance of the List. Measuring the time of the method’s
execution
● How we can improve the performance of a list to which many items are added one by
one
● How to measure the time of the code execution using the Stopwatch class
Type constraints - the constraint on the base type
● More about type constraints
● How we can limit the generic type arguments only to types derived from a certain base
class
Lambda expressions
● What lambda expressions are
Delegates
● What delegates are
● The difference between delegates and Funcs or Actions
● What a multicast delegate is
Dictionary - introduction
● What Dictionaries are
Dictionary - practice
● How to use Dictionaries in practice
Caching
● What caching is
What is LINQ
● What LINQ is
● What the benefits of using it are
● What LINQ queries look like
Deferred execution
● What deferred execution is
● How it can improve the performance of our applications
Any
● How to use the Any method from LINQ
All
● How to use the All method from LINQ
Count
● How to use the Count and LongCount methods from LINQ
Contains
● How to use the Contains method from LINQ
OrderBy
● How to use the OrderBy, OrderByDescending, ThenBy, ThenByDescending methods
from LINQ
Where
● How to use the Where method from LINQ
Select
● How to use the Select method from LINQ
Memory Leaks
● What memory leaks are
● How having static fields in classes may cause the risk of memory leaks
Finalizers
● What destructors (also known as finalizers) are
● When we should define them
CSV Files
● What CSV files are
● Why there is a significant chance you will work with them one day
Attributes
● What attributes are and how to use them
● How to define a custom attribute
● How to use reflection in practice
● What metadata is
Structs
● What structs are and how they differ from classes
● Why structs should rather be small
● How to define type constraints to only allow using value types or reference types as a
generic type parameter
Non-destructive mutation
● What non-destructive mutation is
“With” expression
● How to use the "with" expression to perform non-destructive mutation
Readonly structs
● How to enforce the immutability of a struct
Equals method
● What the Equals method from the System.Object type is
● What its default behavior for value and reference types is
IEquatable<T> interface
● What the IEquatable<T> interface is and why we should bother implementing it
● How it is different from the IComparable<T> interface
● What happens if there are two methods with the same name in a type, which could both
be used with a given argument
== operator
● What the == operator does
● How its behavior differs for value and reference type
Operators overloading
● How operator overloading works in C#
● How to overload the +, ==, != operators
● Which operators can be overloaded, and which cannot
Hash functions
● What hash functions are and how they relate to the GetHashCode method
● What the characteristics of a good hash function are
● What hash conflict is and why it is inevitable
Records
● What records and positional records are
● What the benefit of using them is
Record structs
● What record structs are
Null-forgiving operator
● The purpose of the null-forgiving operator
● How the warnings shown in the Visual Studio can help us improve our code
Implementing IEnumerable
● How to implement the IEnumerable interface in custom collections
Implementing IEnumerable<T>
● How to implement the IEnumerable<T> interface
● What backward compatibility is
● What named arguments are
Indexers
● What indexers are and how to define custom indexers
Collection initializers
● How to implement collection initializers in our custom collection
Big O Notation
● What Big O notation is
● How it can help us understand the complexity of an algorithm
Linked list
● What linked lists are
Performance of Dictionaries
● What the performance of basic operations performed on Dictionaries is
HashSet
● What HashSets are and what the use cases for them may be
● How to remove the duplicates from a collection efficiently
Queue
● What queues are
● What FIFO stands for
● What priority queues are
Stack
● What stacks are
● What LIFO stands for
“Params” keyword
● The purpose of the “params” keyword
Assignment - Custom Linked List - Adding new items at the end of the list
● How to implement the Add and AddToEnd methods for a linked list
Project properties
● What the project’s properties are and how we can change them
Assemblies
● What assemblies are
● What the difference between a project and an assembly is
NuGet
● What NuGet is
*.csproj files
● What *.csproj files are
*.sln files
● What *.sln files are
Char
● More about chars
● Basic methods for character manipulation
Immutability of strings
● About the immutability of strings
● What the underlying data structure for strings is
String interning
● What string interning is
“checked” keyword
● The purpose of the “checked” keyword
● How to deal with numeric overflows
Floating-point numbers
● What floating-point numbers are
Decimal
● How to represent fractions in C# precisely
● More about decimal
● How is decimal different from double
Events
A need for communication between objects
● How sending notifications between software components may be implemented
A need for the Observer design pattern
● What the characteristics of a good notification mechanism are
Raising events
● How to raise events
● The purpose of the Invoke method
● What the purpose of the null-propagating operator is ( ?. operator )
Test messages
● How to specify the test messages
AAA pattern
● What the AAA pattern is
Test cases
● What test cases are and how to define them
Naming parameterized tests
● How to name tests consisting of many test cases
TestCaseSource attribute
● What the limitations of the TestCase attribute are
● How to bypass them by using the TestCaseSource attribute
Basic assertions
● The most basic types of assertions we can make in NUnit tests
Mocks
● What mocks are and how to use them
● How to install the Moq library
● How to install NuGet packages without opening the NuGet package manager