Q
quintin.stone
I haven't been able to find any records of this problem no matter how
much I search. I've got a C# app (.NET 1.1.4322) that has multiple
calls to Activator.CreateInstance() in order to create objects that
get added to an array. However, every call after the first encounters
the same problem: the objects already in the array are mutated to
reflect the properties of the class passed to the most recent
CreateInstance call. It's as if CreateInstance returns a reference to
the identical memory location for each and every call, simply
overwriting whatever object was already there.
Has anyone encountered this behavior before? Is there any
documentation of it out there anywhere?
much I search. I've got a C# app (.NET 1.1.4322) that has multiple
calls to Activator.CreateInstance() in order to create objects that
get added to an array. However, every call after the first encounters
the same problem: the objects already in the array are mutated to
reflect the properties of the class passed to the most recent
CreateInstance call. It's as if CreateInstance returns a reference to
the identical memory location for each and every call, simply
overwriting whatever object was already there.
Has anyone encountered this behavior before? Is there any
documentation of it out there anywhere?