Re: generic data structure question

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Marina (someone_at_nospam.com)
Date: 04/14/04


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
>
>



Relevant Pages

  • generic data structure question
    ... What is the best data structure to use ... to maintain an array of information with containing 3 fields of differing ... method to retrieve the correct record? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Latest version of glossary
    ... such as XML, refer to the use of the term within that "namespace" using ... An n-dimensional data structure, S, is one where each element of S ... Whenever mathematics is applied to anything, ... associative array (while trying to do something in JavaScript, ...
    (comp.databases.theory)
  • Re: how to read dynamic data structures from the kernel (was Re: reading routing table)
    ... could give us individual entries of the data structure on each call, ... steps for any given kernel subsystem -- we have data structures, ... bumping the references and adding pointers to the array. ... the global locks, and proceed lock, externalize, unlock, and copyout each ...
    (freebsd-net)
  • Re: Looking for advise on storring a complex array
    ... hashes etc. ... The trick is that I would not like to have to read back the entire array ... but you should look into using a database with a few ... This *really* depends on your data structure. ...
    (perl.beginners)
  • Re: Larrabee delayed: anyone know whats happening?
    ... be able to ensure that objects that are accessed in separate threads ... How can you do this with linked datastructures? ... E.g. the flavor of sparse array that has cells ... Some funky linked data structure where you can't tell a priori what subsections there are. ...
    (comp.arch)