2 dimensional array of objects
-
Looking for some ideas on a framework for managing a 2 dimensional(dynamic size) array of objects. Something like a grid where one can access by row and column
-
Looking for some ideas on a framework for managing a 2 dimensional(dynamic size) array of objects. Something like a grid where one can access by row and column
-
Looking for some ideas on a framework for managing a 2 dimensional(dynamic size) array of objects. Something like a grid where one can access by row and column
Use the Dictionary object.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
Maybe you could try a List of Lists? then write a function for getting with row column parameters
List<object> objCols = new List<object>();
List<list> objRows = new List<list>();object GetCell(int row, int col)
{return objRows[row][col];
}
Not tested but something along those lines perhaps BTW 'List' can be found in System.Collections.Generic
modified on Friday, January 30, 2009 9:44 AM
-
List<object> objCols = new List<object>();
List<list> objRows = new List<list>();object GetCell(int row, int col)
{return objRows[row][col];
}
Not tested but something along those lines perhaps BTW 'List' can be found in System.Collections.Generic
modified on Friday, January 30, 2009 9:44 AM
-
Use the Dictionary object.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
Hi John, I'm not familiar with this Dictionary approach. Would you have a small snippet that might help.
I can't give you anything better than you'd find on google. Search on "C# Dictionary Collections". You'll get a gazillion examples.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
Hi John, I'm not familiar with this Dictionary approach. Would you have a small snippet that might help.
hi.. follow this link... About Dictionary