Skip to content
UdemyC#Paid courseAll LevelsCertificate

C# Performance Tricks: How To Radically Speed Up Your Code. (Udemy.com)

This course will help you speed up your C# code and provides many tricks that every professional developer must know.

Created by: Mark Farragher

Last updated May 2026

icon
What you will learn

  • Learn the fundamentals of the .NET Framework
  • Enjoy a crash course in Common Intermediate Language
  • What is boxing and unboxing, and how to avoid it?
  • The strange performance gap between 1- and 2-dimensional arrays
  • When should you use a StringBuilder?
  • Garbage collector assumptions about object size and lifetime
  • Using pointers in C# - is it worth the trouble?
  • A super-fast way to construct new objects
  • ... and much more!

How it compares

Against the other 194 rated Udemy courses in C# on CourseDuck:

  • Rating4.4 out of 5higher than 38% of them
  • Reviews1,711#41 of 195 by number of reviews
  • Length4.3 hoursshorter than 60% of them
  • Last updatedMay 2026more recently than 86% of them

icon
Course Description

Do you know how to write fast C# code?

You may have already enrolled in a C# programming course, or learned the language at school or university. But here's a sobering fact: most courses only teach you how to write code, not how to write fast code.

The .NET Framework is huge. For any given problem there are many solutions, and it is not always clear which solution is the best choice.

Did you know that adding strings together using the wrong Framework class will slow down your code by a factor of more than two hundred? And if you're not handling exceptions the right way, your code wil run a mind-boggling thousand times slower than normal.

Slow C# code is a big problem. Slow code on the web will not scale to thousands of users. Slow code will make your user interface unusable. Slow code will make your mobile apps languish in the app store.

Slow code is holding you back!

I can help you.

In a series of short lectures I will cover many common performance bottlenecks. I will introduce each problem, and then write a small test program to measure the baseline performance. Then I will demonstrate each possible solution, and benchmark how each solution measures up.

But there's more! I will also dive into Common Intermediate Code (CIL), the language that the C# compiler compiles to. If this sounds daunting, don't worry! The CIL language is actually very easy to read and understand. I'll take you through the basics in a quick 15-minute lecture.

Being able to read CIL code is a very useful skill that will help you avoid many performance pitfalls and give you a deeper understanding of the .NET Framework.

Why should you take this course?

You should take this course if you are a beginner or intermediate C# developer and want to take your skills to the next level. All my lectures are very easy to follow, and I explain all topics with clear code and many instructive diagrams.

Or you might be working on a critical section of code in a C# project, and need to make your code run as fast as possible. The tips and tricks in this course will help you immensely.

Or maybe you're preparing for a C# related job interview? This course will give you an excellent foundation to answer any performance-related questions they might throw at you.

icon
Udemy Discount

The discount is applied through our link. Open the course from here and Udemy's current promotional price is applied at checkout on most courses, no code to type.

Some courses are excluded from Udemy's promotions. If the price does not drop, clear your browser cookies and use the button again.

icon
Instructor Details

Mark Farragher

Mark Farragher is a blogger, investor, serial entrepreneur, and the author of 12 successful IT courses on Udemy and other marketplaces. His career spans over two decades during which Mark has been a Founder twice and CTO three times, and has launched two lean startups in The Netherlands.

Mark became a Microsoft Certified Trainer in 2005 and started training classes in .NET development, web design, and Microsoft back-office servers. Today he uses his extensive knowledge of IT to help CTO’s, architects, and other tech professionals with their leadership, communication, and technical skills.

Mark has MCSA and MCSD certifications from Microsoft and is a certified Microsoft Trainer and Scrum master. He speaks fluent English, Dutch, and German.

icon
More courses by Mark Farragher

$16.99

$12.99

$14.99

$13.99

$59.99

$11.99

icon
More C# courses

$84.99

$13.99

$64.99

$19.99

$12.99

$84.99

icon
Reviews

4.4

1,711 ratings on Udemy

Select a bar to show only those reviews.Select the bar again to show every rating.

By Anonymized User on 12/4/2022

Pros: High Level expertise in terms of C#. In depth approach and many advanced features explained extensively. Cons: Choosing the correct algorithm to solve a problem, is/must/always-will be the first level of optimization so I 'll just remind what someone said about optimization once "Picking the right data structures and algorithms and just writing dumb code is much more efficient than the other way around". Since it's a course of optimization it is wise to look and improve the code in all levels and especially in the first-level when choosing the algorithms and data structures. Exercises had many brute force algorithms to improve in terms of instructions and tech-features rather than algorithms.

By Jose M Gamez Miranda on 11/22/2022

Overall good course, very important information and explained very well. My only feedback would be regarding "Coding Exercises" for which the UX is not very good as your only feedback are the compilation errors and the results of some Unit Tests, so you can only grind through and expect that you got something right but there is no further feedback on whether that was the best solution or you could improve something else.

By Anonymized User on 8/20/2021

The course provides interesting and valuable information. The information is delivered in manageable chunks that are easily absorbed, at no stage did I feel overwhelmed. The lecturer delivers the course with an excellent tempo, never too fast or too slow and with clear explanations of how and when to apply a particular technique. All lectures are summed up with concise takeaways. A very interesting enjoyable course.

By Anonymized User on 8/29/2020

The course is prepared and presented in a good fashion. Code samples were appropriate and running without a problem. Also, the videos can be watched at 1.5x speed. But there are some problems about the content. 1. The instructor always shows different cases as solutions to a problem and makes performance measurements. But these measurements are done in an ad-hoc way and should have been run thoroughly. For example, tests runs only once and we are presented with results from one-time measurements. The instructor should consider batch runs or using Benchmark.NET library for measurements. 2. There are some inconsistencies throughout the course. For example, in the first lessons the instructor claims that "new" keyword always creates objects on the heap; but there are value types and using "new" on a value type (eg. DateTime) creates the object on the stack. 3. Quizzes for second section "Fundamentals of the .NET Framework" are out of order with the lectures. For example, we are asked the quiz for "The Stack" then the lecture for "The Stack" appears. 4. Since the course is about C#, the instructor should consider running the samples with .NET Core. Because with version 5, the .NETCore will be mainstream and the .NETFramework will be discontinued. Also, making samples with 64-bit configuration as default is a good idea, because almost every machine including our smart phones are running on 64-bit architectures.

By Niclas Houtved Andersen on 5/27/2020

The course goes through a lot of whats actually happening behind - top class for this! But it's a bit out-dated in terms of refering to Xamarin Studios - and no setup guide (For those needing it). Missing alternatives for looking into IL-code - I recommend using dotPeek from Jetbrains which is Free (Or Resharper that can produce look alike setup like he does from within Visual Studio)

By Srikant Krishna on 7/3/2019

Awesome - I've been a long-time C# developer - I thought I knew it all. Within about 10 minutes in just the low-hanging optimizations, I immediately saw things I could do to multiply the performance of my code. Now I'm hooked - and I have no relation to the guy who made this video.

By Philip Dootson on 5/19/2018

Very good course that provides some really useful optimisations, along with examples of when you should (and shouldn’t) use them. Others have commented on the slow pace of delivery, which I didn’t particularly mind, but if you’re relying on the subtitles to understand what’s going on you’re out of luck - they’re complete gibberish. If I could suggest one improvement to Mark it would be to provide a useful alternative to not throwing exceptions. The other tutorials followed a pattern of “don’t do that - do this instead” whereas the exceptions tutorial just ended at “don’t do this”. While I can think of alternatives myself, I felt it would be interesting and beneficial to hear his take on this. Overall, a very useful course which will certainly benefit my development going forwards.

By Radoslaw Kozaczuk on 3/6/2018

Amazing tutorial and great teacher. Everything is perfect with it. Easy to understand and follow, nice voice, and good tempo. Excellent blackboard visualization. Quizzes and example codes are present. Just a small note - on my supersonic machine I had to change the measurement accuracy to ticks in few cases to see clear results (or to see them at all). Anyway, 5/5 strongly recommended

By Guilherme Cavichiolli on 2/23/2017

Excellent course !!! Very useful and interesting content. Clear explanations of the content. Pretty good English pronunciation make very understandable course. Suggestions to improve, maybe improve the levels of audio volume, because some times on noise environments (like a subway) you can't leasing very well on a smartphone with headphones with noise cancelling. Enable English subtitles make the course even more easy to learn. That's all. Great Job!! Thanks!

By Mark Miller on 3/12/2016

A eye opening look under the hood of your code filled with invaluable tips on what to avoid or use to increase code performance. The instructor speaks clearly and gets right to the point of each section. I highly recommend this course to those just starting programming so your on the right track from the word go as well as seasoned programmers who never came from a machine language or DOS environment background as myself.

One of the best course from Mark Farragher.
Always high class courses!
Thanks

I don't write reviews , but for this one i had to write, there are so many things I did not know in C#, but the author made it clear. I would advice you to take this course, needed for all C# programmers.

Showing 12 of 105 reviews

icon
Quality Score

Content Quality
/
Video Quality
/
Qualified Instructor
/
Course Pace
/
Course Depth & Coverage
/

Overall Score : 88 / 100