Wierd collection problem
-
I have a class derived from CollectionBase that is giving me some wierd results. Whenever I add an object to the class, the List goes through my objects and changes all of them to equal whatever value(s) the new added object has. I'm simply using the standard List.Add() method for my Add implementation. Why would it change all other objects in the collection to equal the added object?
-
I have a class derived from CollectionBase that is giving me some wierd results. Whenever I add an object to the class, the List goes through my objects and changes all of them to equal whatever value(s) the new added object has. I'm simply using the standard List.Add() method for my Add implementation. Why would it change all other objects in the collection to equal the added object?
I suggest you get ColGen2 from gotdotnet.com It's a collection generator that does all this for you.