S
Samuel R. Neff
What's the best way to create a collection where a value can be looked
up by multiple keys?
Say I have a custom object,
Class Whatever
Public A As String
Public B As String
Public C As String
End Class
What is the best way to add this object to a collection such that I
can look up an instance of Whatever by any value, A, B, or C?
TA custom collection class backed by three hashtables?
I don't want to use a DataSet/DataTable because the real object is
quite a bit more complex with dozens or properties, nested objects,
and nested collections of custom objects--wouldn't map well to a data
table row.
The order of objects doesn't matter--they're never referenced by
numeric index, only by a key value.
Thanks,
Sam
up by multiple keys?
Say I have a custom object,
Class Whatever
Public A As String
Public B As String
Public C As String
End Class
What is the best way to add this object to a collection such that I
can look up an instance of Whatever by any value, A, B, or C?
TA custom collection class backed by three hashtables?
I don't want to use a DataSet/DataTable because the real object is
quite a bit more complex with dozens or properties, nested objects,
and nested collections of custom objects--wouldn't map well to a data
table row.
The order of objects doesn't matter--they're never referenced by
numeric index, only by a key value.
Thanks,
Sam