# C# REPL using mono or dotnet-script

Published: 2018-10-13
Last updated: 2021-07-20

Quite often, all I want to do is check if a single line of code does what I think it does. I've always been a huge fan of [LinqPad](https://www.linqpad.net/) for a use-case like this. But it's Windows-only and that's a bummer since I do most of my development on a Macbook.

I began googling around a few days back and was pleasantly surprised to find two great options:

## The mono-tools csharp REPL

1. Install mono.
2. Type `csharp` in your terminal to start a REPL.

Here's what it looks like:
![](/images/2018/10/Screen-Shot-2018-10-13-at-17.13.13.png)
The REPL is documented [here](https://www.mono-project.com/docs/tools+libraries/tools/repl/).

## The .NET Core dotnet-script global tool

1. Install .NET Core.
2. Install the global tool using `dotnet tool install -g dotnet-script`.
3. Type `dotnet script` in your terminal.

Here's what it looks like:
![](/images/2018/10/Screen-Shot-2018-10-13-at-17.10.51.png)
This tool covers a lot of use-cases beyond a basic REPL and they're all documented in its [GitHub repo](https://github.com/filipw/dotnet-script). 

For me though, a simple REPL with intellisense is all I want!

