G
Guest
Hello All,
Following is a static method. Can you please tell me if this is
threadsafe...why? If it is not threadsafe...why?
Thank you.
public static string GetCachedApplicationWideObject(string HashtableKey)
{
//Cache["DefaultSampleQPage"] holds the hashtable
if(Cache["DefaultSampleQPage"]==null)
{
CacheApplicationWideObjects();
_sHTable = ((Hashtable)Cache["DefaultSampleQPage"]);
return ((string)HTable[HashtableKey]);
}
else
{
_sHTable = ((Hashtable)Cache["DefaultSampleQPage"]);
return ((string)HTable[HashtableKey]);
}
}
Following is a static method. Can you please tell me if this is
threadsafe...why? If it is not threadsafe...why?
Thank you.
public static string GetCachedApplicationWideObject(string HashtableKey)
{
//Cache["DefaultSampleQPage"] holds the hashtable
if(Cache["DefaultSampleQPage"]==null)
{
CacheApplicationWideObjects();
_sHTable = ((Hashtable)Cache["DefaultSampleQPage"]);
return ((string)HTable[HashtableKey]);
}
else
{
_sHTable = ((Hashtable)Cache["DefaultSampleQPage"]);
return ((string)HTable[HashtableKey]);
}
}