Making Sense of Common C# Compiler Errors

Matt Eland
19 min readOct 26, 2021
Photo by Elisa Ventur on Unsplash

I get to help a lot of people learn C# programming every year. As I watch new developers grow and get used to working in C# and Visual Studio, it has become fairly clear to me that reading C# compiler errors and even their documentation is an acquired skill. I’ve made a request for Microsoft to improve the error message feedback in Visual Studio, but until that’s resolved developers still have a tough time working through early obstacles.

Because of this, I’m creating this unusual post to serve as beginner-friendly documentation to what I personally view as the most likely compiler errors a new developer is likely to encounter. Microsoft has wonderful documentation on compiler errors, and this is something that will help you out significantly as you grow, but early on a paragraph or two aimed at a beginner can be exactly what you need.

I also snuck in a few of the more interesting compiler errors I noticed about the maximum limits of the C# compiler, so even if you’re very familiar with C# at this point you’ll likely still learn a few things skimming this list.

Take a look at my list and my recommendations on these issues and let me know if you find this helpful or encounter something I missed.

CS0003 — Out of Memory

--

--

Matt Eland

Microsoft MVP in AI, AI Specialist at Leading EDJE. Author of "Refactoring with C#".