我需要使用.NET或MONO进行C#/ F#编程.我怎么知道我的C#/ F#代码在哪个平台上运行?
你不应该这样做.但是,如果确实有必要,可以检查Mono.Runtime类型.从单声道常见问题解答:
Type t = Type.GetType ("Mono.Runtime");
if (t != null)
Console.WriteLine ("You are running with the Mono VM");
else
Console.WriteLine ("You are running something else");
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
413 次 |
| 最近记录: |