Skip to content

Instantly share code, notes, and snippets.

View Beej126's full-sized avatar

Beej Beej126

View GitHub Profile
@Beej126
Beej126 / csharp-repl.ps1
Created April 18, 2022 04:07 — forked from noseratio/csharp-repl.ps1
C# REPL with Microsoft.Net.Compilers.Toolset
# https://www.nuget.org/packages/Microsoft.Net.Compilers.Toolset
md cs-repl | cd
nuget install Microsoft.Net.Compilers.Toolset
# run a CS script, a useful alternative to PowerShell itself
echo 'Console.WriteLine("hello");' > script.csx
. (gci -recurse csi.exe).FullName script.csx
# run in REPL mode