.NET ThreadStaticAttribute Class
Indicates that the value of a static field is unique for each thread.
[ThreadStatic]
private static Singlton myInstanace;
private static Singlton myInstanace;
public static Singlton Instance
{
get
{
myInstanace = new Singlton();
return myInstanace;
}
}

浙公网安备 33010602011771号