gpt4 book ai didi

mono - 我如何在运行时检查单声道

转载 作者:行者123 更新时间:2023-12-02 06:10:36 25 4
gpt4 key购买 nike

默认情况下,mono 不信任任何 SSL 连接。因此,如果在单声道上运行,我想给出一条消息而不是抛出异常。

如何检查我是否在运行时在单声道下运行? (因为在编译时 CLI 不会知道)

最佳答案

我会引用 the Mono site :

Having code that depends on the underlying runtime is considered to be bad coding style, but sometimes such code is necessary to work around runtime bugs

using System; 
class Program {
static void Main ()
{
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");
}
}

关于mono - 我如何在运行时检查单声道,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3284674/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com