As a #dotnet dev, when you need to run some throwaway code, you don't need to open an IDE, create a new console app, and discard the changes.
There are lots of tools you can use to run C# code in the bat of an eye.
Let's list some of them ๐งต
1๏ธโฃ LinqPad
It's a playground for running C#, F#, and VB code offline.
๐ run/debug code
๐ run XUnit tests
๐ save your snippets locally
๐ Well-printed object
๐ NuGet packages
๐ only local development
๐ free version does not tidy up your code
๐ @linqpad
2๏ธโฃ try[.]dot[.]net
Minimal online editor, supported by Microsoft
๐ Lightweight
๐ explicit 'using' list
๐ slow execution
๐ no NuGet package
๐ no sharing capabilities
๐ @dotnet
3๏ธโฃ dotnet-repl
Available on GitHub, run your code on a REPL terminal.
๐ Cool
๐ works with C# and F#
๐ free
๐ you can add NuGet packages
๐ on console, harder to write
๐ cannot save snippets
4๏ธโฃ Sharplab
Available at Sharplab[.]io, run code to see the compiled result, IL, syntax tree
๐ good for advanced devs
๐ works with C#, F#, VB, IL
๐ can share code as GIST
๐ no code tidy up
๐ no NuGet packages
5๏ธโฃ .NET Fiddle
Online editor, available at dotnetfiddle[.]net
๐ share and collaborate on code
๐ tidy up code
๐ NuGet packages
๐ choose compiler, language, project type
๐ converts your code to IL and VB
๐ no autocomplete
๐ @dotnetfiddle
6๏ธโฃ dotnet-script
Available on GitHub, run local scripts on a terminal.
Each script is stored in a .csx file.
๐ NuGet packages
๐ Lightweight
๐ save/organize your snippets locally
๐ no autocomplete
๐ no debug
7๏ธโฃ RoslynPad
Available on GitHub and Windows Store, run programs locally
๐ NuGet packages
๐ Lightweight
๐ save/organize your snippets locally
๐ autocomplete
๐ format document
๐ completely free
๐ no debug
Do you use any of them?
Do you have other tools to suggest?
What are the must-have features for such tools?
Share this Scrolly Tale with your friends.
A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.