>>(1) Are we only talking about the App.oApp.Tables
>
>In the same, following the NameObjectCollectionBase objects, I have:
>
>App.oApp.Countries
>App.oApp.Messages
>App.oApp.Provinces
>App.oApp.Tables
>
>I have a NameObjectCollectionBase for Fields as well but this one falls under App.oApp.Tables("TableNameHere").Fields. But, I do not think this would be of any impact here.
>
>>(2) Is App.oApp reinitialized on occasion or not
>
>App.oApp does not get reinitialized once it is initialized at first. Some properties of it might be changed but this is not a factor.
Have you tried using a lock ?
In the code below, anyone accessing Tables will block if Tables is being reinitialized
public class AClass
{
private Dictionary<string, string> Tables_;
private object TableLocker = new Object();
public Dictionary<string, string> Tables
{
get
{
lock (TableLocker)
{
return Tables_;
}
}
private set
{
Tables_ = value;
}
}
public void ReInitalizeTables()
{
lock (TableLocker)
{
Tables_ = new Dictionary<string, string>();
Tables_.Add("1", "one");
Tables_.Add("2", "two");
}
}
}
Gregory