D
dx
I'd appreciate some ideas or direction with a collection issue.
I need to create a custom collection that inherits ICollection, IEnumberable
(need to be able to access by key, index and be able to enumerate) and this
is the kicker...should be able to define the location (index) when inserting
a new item (like arraylist allows.) The real challenge here is being able to
specify the index or where the item will appear when enumerating thru the
collection. I have the rest working by inheriting from
NameObjectCollectionBase.
My problem stems from an object collection I'm using. This collection is
initially instantiated and loaded with items in a specific order. This
object remains in memory, a user can add a new item to the collection after
it is initially loaded. When the user adds a new item (object) to the
collection, the item always appears as the last item when enumerating thru
the collection... which I do not want. I want to be able to specify where
the new item will be placed when enumerating thru this collection.
Is it possible to inherit ArrayList and incorporate the IDictionary
interface? Any ideas on how to do this?
Thanks in advance for any potential help you can provide.
stan
I need to create a custom collection that inherits ICollection, IEnumberable
(need to be able to access by key, index and be able to enumerate) and this
is the kicker...should be able to define the location (index) when inserting
a new item (like arraylist allows.) The real challenge here is being able to
specify the index or where the item will appear when enumerating thru the
collection. I have the rest working by inheriting from
NameObjectCollectionBase.
My problem stems from an object collection I'm using. This collection is
initially instantiated and loaded with items in a specific order. This
object remains in memory, a user can add a new item to the collection after
it is initially loaded. When the user adds a new item (object) to the
collection, the item always appears as the last item when enumerating thru
the collection... which I do not want. I want to be able to specify where
the new item will be placed when enumerating thru this collection.
Is it possible to inherit ArrayList and incorporate the IDictionary
interface? Any ideas on how to do this?
Thanks in advance for any potential help you can provide.
stan