您好操作系统用C#和放大器;单声道?放大器、您好、单声道、操作系统

由网友(在这个玩直播的年代,看直播和玩直播的人都非常多,今天小编分享)分享简介:有没有办法来确定哪些操作系统,我们运行的是单声道的,用C#code? Is there a way to identify in which OS we are running mono, with C# code? 某种形式的Hello World,但不是使用固定的字符串作为输出使用目前的操作系统?Some s...

有没有办法来确定哪些操作系统,我们运行的是单声道的,用C#code?

Is there a way to identify in which OS we are running mono, with C# code?

某种形式的Hello World,但不是使用固定的字符串作为输出使用目前的操作系统?

Some sort of Hello World, but instead of using a fixed string as an output use the current OS?

推荐答案

尝试 System.Environment.OSVersion

您也可以检测,如果你的code为单声道或MS.NET下运行:

You can also detect if your code is run under Mono or MS.NET:

if (Type.GetType("Mono.Runtime") != null) 
{
    // we're on Mono
    IsMono = true;
} 
else
    IsMono = false;
阅读全文

相关推荐

最新文章