Created
May 17, 2016 18:07
-
-
Save JamesTryand/ea9605437421b54951f725c41fd38dcf to your computer and use it in GitHub Desktop.
Compile C# on the commandline in powershell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$x = @' | |
using System; | |
namespace X { | |
public class Y { | |
public string Echo(string echo) { | |
return echo + echo; | |
} } } | |
'@ | |
add-type -typedefinition $x | |
$why = new-object X.Y | |
$why.Echo("Cake") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment