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 Image
2️⃣ try[.]dot[.]net

Minimal online editor, supported by Microsoft

πŸ‘ Lightweight
πŸ‘ explicit 'using' list

πŸ‘Ž slow execution
πŸ‘Ž no NuGet package
πŸ‘Ž no sharing capabilities

πŸ”— @dotnet Image
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 Image
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 Image
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 Image
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 Image
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 Image
Do you use any of them?

Do you have other tools to suggest?

What are the must-have features for such tools?

β€’ β€’ β€’

Missing some Tweet in this thread? You can try to force a refresh

Keep Current with Davide Bellone 🌊 πŸ—‘

Davide Bellone 🌊 πŸ—‘ Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!


Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @BelloneDavide

31 May 21
An introduction to Unit Tests (UT), Mocks, Integration Tests (IT), End-to-end Tests (E2E).

Say that you want to learn how to drive. πŸš—

At home, you have a car simulator.
Your Unit Tests will be:
πŸ”Έhow to turn on the car
πŸ”Έhow to speed up
πŸ”Έhow to slow down
πŸ”Έwhat to do with a red light

You are not using a real car, but a simulator. This is your *mock*.

UTs: test the behaviors in a controlled environment with mocks.

They are fast: you can stay at home with your simulator. In a minute you'll be able to redo your tests and add more (eg: turn on the lights)

Read 9 tweets

Did Thread Reader help you today?

Support us! We are indie developers!

This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!


0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy


3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!