Behind the compiler: 20 examples of C# code before and after compiling

Over years I have written many blog posts about C# and .NET that demonstrate also how things work internally and what C# compiler produces from the code we write. I have called these chapters usually as “Behind the compiler”. This post is growing list of my writings covering interesting findings about C# compiler work.

Behind the compiler posts

  1. Throw expressions in C# 7.0
  2. Using-declarations in C# 8.0
  3. Expression bodied members in C# 7.0
  4. More expression-bodied members in C#
  5. Internals of tuple literals
  6. Default literal expressions in C# 7.1
  7. C# and Partial Classes
  8. Non-trailing named arguments in C# 7.2
  9. Writing IL code on Visual Studio
  10. IL perversions: throwing and catching strings
  11. var keyword in C#
  12. Pattern matching in switch statements
  13. Adding attribute to backing field of automated property
  14. Are lock and Monitor the same in C#?
  15. Deep dive to async Main
  16. Anonymous types in C#
  17. Out variables in C# 7.0
  18. All about IDisposable
  19. Code Contracts: How they look after compiling?
  20. Automatic properties in C#
Liked this post? Empower your friends by sharing it!
Serverless360 Logo

A portal focused on Operations and Support for Microsoft Azure Serverless services

FREE TRIAL

Gunnar Peipman

Gunnar Peipman is ASP.NET, Azure and SharePoint fan, Estonian Microsoft user group leader, blogger, conference speaker, teacher, and tech maniac. Since 2008 he is Microsoft MVP specialized on ASP.NET.

    3 thoughts on “Behind the compiler: 20 examples of C# code before and after compiling

    Leave a Reply

    Your email address will not be published. Required fields are marked *