Skip to content

Commit 889f3cf

Browse files
committed
compile
1 parent 5ea7efe commit 889f3cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CSharp.Scripting.csx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Console.WriteLine(@"测试输入输出函数:Directory.GetCurrentDirectory()");
1616
var res = await CSharpScript.EvaluateAsync(@"
1717
using System;
1818
Console.WriteLine(10086);
19-
Directory.GetCurrentDirectory()",so);// *if end with ; no return value
19+
Directory.GetCurrentDirectory()", so);// *if end with ; no return value
2020
Console.WriteLine(res);
2121

2222

@@ -40,6 +40,7 @@ var script = CSharpScript.Create(codeText, scriptOptions);
4040
*/
4141
try
4242
{
43+
script.Compile();
4344
res = await script.RunAsync();
4445
print(res);
4546
}

0 commit comments

Comments
 (0)