TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rob
NA
1
0
Collection with multiple keys
Jun 3 2008 3:55 AM
Hi,
I've seen collections where elements can be accessed using different 'keys' or accessors in an overloaded array sort of way. Let me show you what I mean:
MyCollection[3] would get the 4th object in the collection
MyCollection["title"] would get the object with a title of 'title'
MyCollection[SomeObj] would get the object with the matching SomeObj
I'm not sure how this is done; through some type of extended collection or using some type of interface. Does anyone have any simple examples of doing this? Or any suggestions on what I might be trying to do?
Many thanks,
Rob
Reply
Answers (
3
)
Help with counting individual values in an array
What's the best way to do this?