B
Bob Weiner
I'm new to C#.
What is the best (in terms of programmability and use) data structure to use
to maintain an array of information with containing 3 fields of differing
types. For instance:
string name
int age
bool gender
If I created an array of structs would I be able to retrieve an age for a
given name without writing a search routine? Can I use the Array.IndexOf
method to retrieve the correct record?
Would a Hashtable/Dictionary be more efficient? Do I need to create my own
class? With VB6 I've used a recordset but bringing in ADO seems like
overkill.
Not vital but I would like to put the perenial problem to rest.
thanks,
bob
What is the best (in terms of programmability and use) data structure to use
to maintain an array of information with containing 3 fields of differing
types. For instance:
string name
int age
bool gender
If I created an array of structs would I be able to retrieve an age for a
given name without writing a search routine? Can I use the Array.IndexOf
method to retrieve the correct record?
Would a Hashtable/Dictionary be more efficient? Do I need to create my own
class? With VB6 I've used a recordset but bringing in ADO seems like
overkill.
Not vital but I would like to put the perenial problem to rest.
thanks,
bob