
Introduction to C# performance
This course will teach you how to speed up your C# code with performance tricks that every professional developer should know.
You’ll learn the fundamentals of the .NET Framework, how the Garbage Collector works, the difference between the stack and the heap, what boxing and unboxing is, and much more!
I’ll even give you a crash course in Intermediate Language so that you can actually read the machine language produced by the C# compiler. We’ll compile a couple of code snippets, take a look at the IL code and see if we can make any improvements.
Here’s What You’ll Get

Training Lectures

Video Lessons

Quizzes

C# Optimizations

Certificate

Access
Training Details
You’ll learn the fundamentals of the .NET Framework, how the Garbage Collector works, the difference between the stack and the heap, what boxing and unboxing is, and much more!
We’ll also look at array performance, using pointers in C# to manipulate memory directly, and a neat trick to place an array in stack memory for extra performance.
Throughout the course we will be compiling C# code snippets into Intermediate Language, and then inspecting the compiled code for performance bottlenecks. You’ll learn how to interpret basic IL instructions and read machine code directly.
Format: Self-paced.
Content: training lectures, video lessons, quizzes and coding exercises.
Requirements: a Windows, Mac or Linux laptop with Microsoft Visual Studio or Visual Studio Code.
Support: Slack channel.
Associated certification: none.
Sneak Preview
In this complimentary training lecture I will teach you how to optimize arrays in C#. We’ll look at 1-dimensional arrays, multidimensional arrays and jagged arrays and compare the performance of all three. You will also learn a technique called Array Flattening to speed up 2-dimensional arrays.
Training Curriculum
Introduction
Introduction to code optimization
Fundamentals of the .NET Framework
Quiz
The Stack
Quiz
The Heap
Quiz
Value Types
Quiz
Reference Types
Quiz
Boxing and unboxing
Quiz
Immutable Strings
Recap
Basic Optimizations: the low-hanging fruit
How to prevent boxing and unboxing
Fast string concatenation
Fast collections
Fast arrays
Throwing and catching exceptions
For versus Foreach
Coding Exercises
Recap
Quiz
Intermediate Optimizations
Fast Garbage Collection (Part 1 and Part 2)
Fast delegates
Fast class factories
Recap
Quiz
A crash course in Intermediate Language
Common Intermediate Language
Recap
Quiz
Advanced Optimizations
Arrays on the stack
Pointers (Part 1 and Part 2)
Background Info – Modifying String Constants
Recap
Quiz
In Conclusion
Bonus lecture
Sign Up For This Training
Once we have received your payment, you will receive an email within minutes with a link to access the online training platform.
Please note that the listed price is ex VAT. Registered EU businesses with a valid VAT number can defer the VAT during checkout. Non-EU businesses and individuals do not pay VAT.
Looking For Something Else?
Is this online training not what you’re looking for? Then please check out my other C# training courses.
Related Microsoft Training
Would you rather train with your team in a classroom setting? Then please check out my Microsoft C# training courses.
No Results Found
The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.
Rune Solberg, online student
See Me In Action
C# PERFORMANCE TRAINING FOR THE DUTCH ARMED FORCES IN AMERSFOORT
In 2022 I gave a C# Performance training for the Dutch armed forces who are using .NET code in some of the embedded systems of their artillery vehicles. In a 3-day training I showed military software developers how to optimize the performance of C# code running on a restricted hardware platform.
Unfortunately I wasn’t allowed to take pictures of the team or the barracks, so all I can show you is a photo of this very cool old tank that was parked next to the army museum.

Frequently Asked Questions
- Classroom Training
- Microsoft Training
- Online Training
- Misc