Mar 1, 2018

Online C# compilers

Leia esta post em Português

Lire cet article en français







Hi

If you develop using C# and you like to experiment with code you should try using one of the online C# compilers (there are a bunch of them). They allow you to quickly test assumptions about the C# code, test how code behaves, etc.

Among those, one that I grew to love is sharplab.io which besides allowing you to play with C# code, also has a set of really nice features, which I'll briefly describe bellow.

Branch/Feature selection

If you are following C# language development (you should ;)) this feature is really useful; it allows one to choose which compiler (built from various feature branches), to use, i.e, you can experiment with features under development by simply selecting which compiler to use.

Display compiler Syntax Trees

This is similar to  the Roslyn Syntax Visualizer window in Visual Studio (this window will only be available if you install .NET Compiler Platform SDK in Visual Studio). Very useful if you are playing with Roslyn.

Display Generated IL

This is the type of feature that most C# developers will never need, but for those who actually need, this is really powerful. Want to see how some piece of C# code is translated to IL? simply type the code and select IL in the dropbox and voialá. 

Show generated JITed/ASM code

If the previous feature was not for most C# developers, this one is even more restricted, but  it can really help developers that need to check how some piece of C# code is translated to actual machine code (this can be very useful when you are trying to better understand how your C# code runs in the processor)

That's it.

Have fun

Adriano

No comments: