Re: generic data structure question
From: Marina (someone_at_nospam.com)
Date: 04/14/04
- Next message: Mohamoss: "RE: how to set user to ASPNET back for db connections??"
- Previous message: Marina: "Re: compilation of .net languages..."
- In reply to: Bob Weiner: "generic data structure question"
- Next in thread: Michael Giagnocavo [MVP]: "Re: generic data structure question"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 14 Apr 2004 12:38:13 -0400
It sounds like a database table - you have 3 fields, and multiple records.
Try using a datatable.
"Bob Weiner" <bob@engr.uconn.edu> wrote in message
news:%23BUoiojIEHA.940@tk2msftngp13.phx.gbl...
> 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
>
>
- Next message: Mohamoss: "RE: how to set user to ASPNET back for db connections??"
- Previous message: Marina: "Re: compilation of .net languages..."
- In reply to: Bob Weiner: "generic data structure question"
- Next in thread: Michael Giagnocavo [MVP]: "Re: generic data structure question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|