>>>>Interesting. It's cleverer than I thought. But :
static void TestWithForEach()
>>> {
>>> int l = Tables.Length;
>>> ReInitializeTables();
>>> Console.WriteLine(Tables[l]);
>>>
>>> Console.ReadLine();
>>> }
>>
>>
>>Would fail - even without ReInitializeTables()
>
>Duh. OK : Console.WriteLine(Tables[l-1]);
>
>>Bear in mind that Michel stores a refernce of App.oApp.Tables in another object oProcess and continues working with that reference. When App.oApp.Tables is replaced by a new occurrence - oProcess continues to use the previous object
>
>That's what I don't get.
>oProcess.Tables = App.oApp.Tables;
>It's still a reference. If you change App.oApp.Tables then you change oProcess.Tables ?
No - but he doesn't change Tables once it's been initialized - it contains lookup data - a bit like a table Countries
Once in a while a country is added - so Countries is reinstantiated and reinitialized - then assigned to App.oApp.Countries
Now - App.oApp.Countries contains one more entry than oProcess.Countries - which is the previous instance
Gregory