Created
October 11, 2013 12:26
-
-
Save thethomaseffect/6933803 to your computer and use it in GitHub Desktop.
C# in Powershell Scripts
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
$Source = @" | |
namespace CSharpPSTest | |
{ | |
public static class PSTest | |
{ | |
private static string _result = "Default Value"; | |
public static string Get() | |
{ | |
return "Get Success: " + _result; | |
} | |
public static string Set(string s) | |
{ | |
_result = s; | |
return "Set Success: " + _result; | |
} | |
} | |
} | |
"@ | |
Add-Type -TypeDefinition $Source -Language CSharp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment