

While you could do this manually, many of these translations automatically happen during the build process.

Lowering transforms high-level language features into “simpler” techniques within the same language. For example, you could easily interpret a foreach block into a lower version of a for block.

You can look at these keywords as shorthand for other basic language building blocks. Most modern C# codebases include high-level keywords such as foreach, var, using, async, and await. When you write C# code, your ultimate goal is to compile the code to a runnable artifact, but it’s rarely a simple one-step process. This post will discuss “lowering” and how ReSharper can help you uncover the magic behind the curtain. How do C# language designers keep packing in new language features while allowing you to target older runtimes and keeping your applications performant? Well, it’s all about Lowering. Its high-level features allow you to write terse expressions that typically require several lines of code in lower-level languages such as C. The C# programming language is jam-packed with so much syntactic sugar it would make your dentist mad.
