Hi Stefan,
try using the Clone() method, this creates a shallow copy of the collection
Mike Powell
www.ramuseco.com
"Stefan Hoffmann" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> hi,
>
> Stefan Hoffmann schrieb:
>> public class myCollection : System.Collections.CollectionBase
>> {
>> protected myCollection()
>> {
>> }
>> Using
>>
>> myCollection originalCollection = new myCollection;
>> myCollection shallowCopy = new myCollection;
>>
>> originalCollection.CopyTo(shallowCopy, 0);
>>
>> won't work.
> This is the real inheritence chain:
>
> class NullSafeCollection: System.Collections.CollectionBase {}
> class StraightSegmentList: NullSafeCollection {}
>
> Using
>
> StraightSegmentList originalSegments;
>
> StraightSegmentList copy = new StraightSegmentList();
> originalSegments.CopyTo(copy, 0);
>
> doesn't compile.
>
>
> mfG
> --> stefan <--
>