sharplab.io – ashmind/SharpLab: .NET language playground
Posted by jpluimers on 2024/05/08
[Wayback/Archive] ashmind/SharpLab: .NET language playground is hosted on [Wayback/Archive] SharpLab.io and has this README:
[Wayback/Archive] SharpLab/README.md at main · ashmind/SharpLab:
This repository contains source code for https://sharplab.io.
SharpLab is a .NET code playground that shows intermediate steps and results of code compilation. Some language features are thin wrappers on top of other features — e.g.
using()becomestry/finally. SharpLab allows you to see the code as compiler sees it, and get a better understanding of .NET languages.Recent versions include experimental support for running code, with some limitations.
Languages
SharpLab supports three source languages:
- C#
- Visual Basic
- F#
Due to complexity of F#’s compiler library, some features might not be available for F#.
Decompilation/Disassembly
There are currently three targets for decompilation/disassembly:
- C#
- IL
- JIT Asm (Native Asm Code)
Note that VB=>C# disassembly shouldn’t be used to convert between languages, as the produced code is intentionally overly verbose.
Execution
You can use “Run” target to execute your code and see the output.
Execution enables a few nice features such as flow arrows — see here:
https://twitter.com/ashmind/status/894058159223955456.Execution is intentionally limited, however the limits are continuously improved and corrected.
Demos
[Wayback/Archive] 👾 on Twitter: “Something I’m kind of excited about: “ (with [Wayback] video)
- [Wayback/Archive] 👾 on Twitter: “Can be used to explain execution to people, e.g. lazy evaluation of Enumerable: …”
- [Wayback/Archive] 👾 on Twitter: “@dramthethief sharplab.io in “Run” mode: …”
Via
–jeroen








Leave a comment