C# Language Internals - Part 1

C# Language Internals is designed to give you a deeper understanding of the C# programming language and the CLR.
Course info
Rating
(519)
Level
Advanced
Updated
Jan 29, 2014
Duration
5h 10m
Table of contents
Essential Techniques
The CLR and IL in a Nutshell
C# Compiler Tidbits
Performance of Imperative C# Code
Performance of Functional C# Code
Leveraging C# Extensibility Points, Part 1
Leveraging C# Extensibility Points, Part 2
Generics Behind the Scenes
Description
Course info
Rating
(519)
Level
Advanced
Updated
Jan 29, 2014
Duration
5h 10m
Description

This course takes .NET developers behind the scenes of C# language features to gain a deeper understanding of the language, the Intermediate Language (IL) it compiles into, and the Common Language Runtime (CLR) it runs on. By studying language internals, you can make well-informed design choices, solve hard debugging puzzles quicker, and understand the performance ramifications of using various language features. This is the first part of a two-part course.

About the author
About the author

Bart is a software engineer building massive scale data processing systems at Microsoft. His areas of expertise include programming languages, runtimes, reactive programming, and databases. Prior to joining Microsoft, Bart was an MVP for C#. Bart is a popular speaker at various conferences and the author of a few C# books.

More from the author
Introduction to the .NET Compiler Platform
Intermediate
4h 49m
23 Oct 2014
C# Language Internals - Part 2
Advanced
4h 39m
9 Jun 2014
Section Introduction Transcripts
Section Introduction Transcripts

C# Compiler Tidbits
Hi everyone, and welcome back to the C# language internals course here at Pluralsight. I'm Bart De Smet, and in this module we'll talk about C# Compiler Tidbits. As we discussed in the very first module of this course, the C# compiler is called csc. exe, and it can be invoked at the command line or indirectly to Visual Studio and MSBuild. Now, as you may expect, the compiler can be configured in a variety of ways, so there are quite a few knobs that you can turn, and we'll talk those in quite some depth during this module. Now, in order to configure the compiler, you can either specify those knobs at the command line or you can configure them to Visual Studio, but you can also specify an. rsp file or a response file, and in fact the compiler's defaults are actually stored in a file called csc. rsp in the framework installation folder. Now, what are the different categories of compiler options that we can actually enable? Now, first of all there are a set of options that have to do with the specification of the output. So, you can configure whether you want to compile to an executable, a Windows object file for Windows metadata in the Windows Runtime, maybe DLL as a class library, and many other options. You can also specify the target platform, which we'll talk about in quite some depth. We can reference various assemblies including. NET framework assemblies themselves. We can specify various options that influence the code generation, and that will be the topic of discussion next where we'll talk about optimization. We can also configure language options so you can restrict what the compiler supports through a certain subset of the language. There are various security settings for things like strong naming, which we won't really talk about here, and finally a bunch of advanced options.