单声道,shell脚本?

问题描述:

csharp(版本为Mono C#编译器版本4.0.0.0)允许编写 C#脚本,例如

csharp ( version Mono C# compiler version 4.0.0.0) allow to write C# scripts, like

#!/usr/bin/csharp

Console.WriteLine( "Hello world !" );

我尝试添加main()函数,但遇到解析错误,例如

I tried to add a main() function, but got parsing errors, like

{interactive}(1,9): error CS1525: Unexpected symbol `(', expecting `,', `;', or `='

是否有有关此脚本的文档?

Are there docs about this scripting ?

它允许使用功能吗?

您需要更新版本的mono/csharp:要么等待新版本的mono 2.11.x/2.12.x,要么自己从git编译.这样您就可以交互式地定义类.

You need a newer version of mono/csharp: either wait for a new release of mono 2.11.x/2.12.x or compile it yourself from git. That allows you to define classes interactively.