你好我使用從MSDN下面的代碼供內部使用的我公司:未經Microsoft許可,我可以使用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;
}
}
}
我不知道這是非法的或我要得到來自微軟的任何授權或許可才能使用。它僅僅是一個單pattern.the另一種是頁面對象模式是使用自動化,我在網上搜索