Hello,
If I have a singleton pattern as follows:
public class GlobalSingleton
{
private static GlobalSingleton _instance;
public static GlobalSingleton Instance
{
get
{
if( _instance == null )
_instance = new GlobalSingleton( );
return _instance;
}
}
public SqlCommand Command{ get;set; }
public CustomType AnotherProperty{ get; set; }
protected GlobalSingleton( )
{
SqlCommand cmd = new SqlCommand( );
CustomType ct = new CutomType( );
}//end function
}
So Let's say User A is logges in first and does a following call:
GlobalSingleton userAGs = GlobalSingleton.Instance;
Now, another User logs in : and does
GlobalSingleton userBGs = GlobalSingleton.Instance;
My question is:
Will Command and AnotherProperty proper ...
Go to the complete details ...