Collection indexes
From: songie D (anonymous_at_discussions.microsoft.com)
Date: 05/13/04
- Next message: Fabrizio Viggiani: "Re: Changing Password to an account that has to change password at first logon using System.DirectoryServices"
- Previous message: songie D: "deployment of a .NET DLL"
- Next in thread: Ravikanth[MVP]: "RE: Collection indexes"
- Reply: Ravikanth[MVP]: "RE: Collection indexes"
- Maybe reply: songie D: "Re: Collection indexes"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 13 May 2004 01:51:04 -0700
If you remove an item from a collection (that is derived from CollectionBase and thus implements IList)
will the index property automatically 'shuffle' up one?
i.e. if of {0, 1, 2, 3} I delete item 2, then will I be left with {0, 1, 2} or {0, 1, 3} ?
Basically I am implementing a custom collection and wondered if I could rely on
the fact that for(int i=0; i<List.Count; i++) would always be an appropriate loop.
- Next message: Fabrizio Viggiani: "Re: Changing Password to an account that has to change password at first logon using System.DirectoryServices"
- Previous message: songie D: "deployment of a .NET DLL"
- Next in thread: Ravikanth[MVP]: "RE: Collection indexes"
- Reply: Ravikanth[MVP]: "RE: Collection indexes"
- Maybe reply: songie D: "Re: Collection indexes"
- Messages sorted by: [ date ] [ thread ]