So, i throw this idea away and store the Hashtable Object in a member of SerializeableHashtable. That will work ... Thanks a lot for your help
Thomas Gondorf
Posts
-
Extending System.Collections.Hashtable -
Extending System.Collections.HashtableHi, I am new to C# and trying to create an extended Class Library that extends Hashtable. I have created a new class like this: 'public class SerializeableHashtable: System.Collections.Hashtable' In a method called Load i load a Hashtable object from file and try to set it to SerializeableHashtable like this: public System.Collections.Hashtable LoadHashtableForSample() { System.Collections.Hashtable table = new System.Collections.Hashtable(); return table; } public void Load() { this = LoadHashtableForSample(); // fails because this is readonly base = LoadHashtableForSample(); // fails because it is not the right context for base ?!? } Both of the things i try in Load fails. So the big question is: How can i assign the Hashtable object to SerializeableHashtable? (In C++ it works using the this pointer ...) Thanks a lot in advance Thomas