hi i am using the following code from msdn for internal use for my company:
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;
}
}
}
i wonder if this is illegal or i have to get any permission or license from Microsoft in order to use that. it is just a singleton pattern.the other one is page object pattern that is use for automation that i search online
Aucun commentaire:
Enregistrer un commentaire