c# Multi diemention (array, arraylist, or hashtable) ?

Posted by Data-Base on Stack Overflow See other posts from Stack Overflow or by Data-Base
Published on 2010-05-04T08:47:35Z Indexed on 2010/05/04 8:58 UTC
Read the original article Hit count: 205

hello,

I'm trying to figure out how to build a multi dimensional "array" that is:

  • flexible size
  • use 2 keys
  • 1st key is int (flexible)
  • 2nd key is string (kind of limited)

the use will be like

console.writelen(array[0]["firstname"]);
console.writelen(array[0]["lastname"]);
console.writelen(array[0]["phone"]);

console.writelen(array[1]["firstname"]);
console.writelen(array[1]["lastname"]);
console.writelen(array[1]["phone"]);

.....
.....

console.writelen(array[x]["firstname"]);
console.writelen(array[x]["lastname"]);
console.writelen(array[x]["phone"]);

something like this

© Stack Overflow or respective owner

Related posts about c#

Related posts about arrays