M
Michael Kellogg
I created a custom collection based on
System.Collections.Specialized.NameObjectCollectionBase. I also
implemented two version of the "Item" property and coded them both as
Default properties.
Now, when I look at the data, everything looks good; the underlying objects
in there, and the Item property returns the same even if I just access like
this: Label(i), so that is cool.
However, I tried to do a For...Each on the object just now and it's not
returning to me the underlying object (as is specified in the Item
properties). Instead it's returning the string key for that element.
What gives? I want to iterate through the collection with a For...Each but
cannot see what I'm doing wrong.
Appreciate any suggestions.
System.Collections.Specialized.NameObjectCollectionBase. I also
implemented two version of the "Item" property and coded them both as
Default properties.
Now, when I look at the data, everything looks good; the underlying objects
in there, and the Item property returns the same even if I just access like
this: Label(i), so that is cool.
However, I tried to do a For...Each on the object just now and it's not
returning to me the underlying object (as is specified in the Item
properties). Instead it's returning the string key for that element.
What gives? I want to iterate through the collection with a For...Each but
cannot see what I'm doing wrong.
Appreciate any suggestions.