gpt4 book ai didi

c# - 未经 Microsoft 许可,我可以使用 MSDN 中的示例代码吗?

转载 作者:行者123 更新时间:2023-11-30 21:54:09 28 4
gpt4 key购买 nike

您好,我正在使用 msdn 中的以下代码供我公司内部使用:

using System;

public sealed class Singleton
{
private static volatile Singleton instance;
private static object syncRoot = new Object();

private Singleton() {}

public static Singleton Instance
{
get
{
if (instance == null)
{
lock (syncRoot)
{
if (instance == null)
instance = new Singleton();
}
}

return instance;
}
}
}

我想知道这是否非法,或者我必须获得 Microsoft 的任何许可或许可才能使用它。它只是一种单例模式。另一种是页面对象模式,用于我在线搜索的自动化

最佳答案

是的,您可以在未经许可的情况下使用 MSDN 示例代码,因为它可以在 Microsoft Limited Public License 下找到。 :

This license governs use of code marked as “sample” or “example" available on this web site without a license agreement, as provided under the section above titled “NOTICE SPECIFIC TO SOFTWARE AVAILABLE ON THIS WEB SITE.” If you use such code (the “software”), you accept this license. If you do not accept the license, do not use the software.

...

  1. Grant of Rights

(A) Copyright Grant - Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.

(B) Patent Grant - Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.

关于c# - 未经 Microsoft 许可,我可以使用 MSDN 中的示例代码吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33318732/

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