Skip to content

Commit

Permalink
[system.compile] snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
polterguy committed Nov 9, 2023
1 parent 380e712 commit 6111d5e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions backend/files/etc/snippets/system.compile.hl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

//Compiling a snippet of C# code.
system.compile
references
.:System.Console
.:System.Runtime
.:System.Private.CoreLib
code:@"
public class Foo
{
public void Bar()
{
System.Console.WriteLine(""Hello from console"");
}
}
"
assembly-name:foo

// Saving our compiled CLR assembly to /etc/foo.dll
io.file.save.binary:/etc/foo.dll
get-value:x:@system.compile

0 comments on commit 6111d5e

Please sign in to comment.