【问题标题】:Can Mono's CSharpRepl be used to create methods and classes?Mono 的 CSharpRepl 可以用来创建方法和类吗?
【发布时间】:2013-06-16 05:01:29
【问题描述】:

如果我输入以下内容:

class Klass {
public int X;
}

我得到错误:

{interactive}(1,1): error CS1525: Unexpected symbol 'class', expecting 'using'

有没有办法将类和方法输入到 Mono 的 CSharpRepl 中?

【问题讨论】:

    标签: c# mono read-eval-print-loop


    【解决方案1】:

    与 mono 2.10.x 一起打包的 csharp 命令不支持类声明。为此,您必须升级到 mono 3.0.x。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-11-15
      • 2011-06-10
      • 2020-11-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多