Run C# Code Snippet in your Terminal with CSharpRepl.

Zeeshan Ali
2 min readAug 9, 2023

--

What do you do when you have a piece of code and you want to run and see the output of the code immediately?

I used to either find an online c# console or create a simple Console application, Yes we can also execute our code snippet in Visual Studio C# Interactive window, which you can find from View > Other Windows > C# Interactive.

C# Interactive Window. Visual Studio 2022.

But honestly, I am not comfortable with this tool so I found another awesome command-line interactive tool for C#.

It's “CsharpRepl”.

CSharpRepl supports Syntax highlighting, Nuget support, Intellisense, and reference to the local .Net projects or Assemblies.

Installing CSharpRepl is a quite simple task, you just need to execute this command in your Terminal and you are done.

dotnet tool install -g csharprepl 

Next time, just type csharprepl in your Terminal and you are ready to go.

That’s all I guess! If you want to deep dive and find more details about CSharpRepl, you may visit its official website https://fuqua.io/CSharpRepl/ or GitHub https://github.com/waf/CSharpRepl

Thank you for visiting; —

—; Please clap and follow if you found this article helpful; —

BaBye.

--

--

Zeeshan Ali
Zeeshan Ali

Written by Zeeshan Ali

I am a Software Architect with 12 years of experience in Microsoft technologies. I specialize in designing and implementing high-performance, scalable solutions

No responses yet