Dovberman
asked on
Search Multidimensional Array for Specific Column Value
I have the following array:
// Declare array
public string[,] arrDeck = new string[3, 4];
// Constructor
public MainPage()
{
InitializeComponent();
// populate multidimension array (two dimensions)
arrDeck[0, 0] = "a2";
arrDeck[0, 1] = "This is not a recommended starting hand";
arrDeck[0, 2] = "5.4 Pct";
arrDeck[0, 3] = "153";
arrDeck[1, 0] = "a2s";
arrDeck[1, 1] = "You need 3 callers in an unraised pot. You need 4 callers in a raised pot.";
arrDeck[1, 2] = "12.7 Pct";
arrDeck[1, 3] = "39";
}
How do I search to find "a2s" ?
Thanks,
// Declare array
public string[,] arrDeck = new string[3, 4];
// Constructor
public MainPage()
{
InitializeComponent();
// populate multidimension array (two dimensions)
arrDeck[0, 0] = "a2";
arrDeck[0, 1] = "This is not a recommended starting hand";
arrDeck[0, 2] = "5.4 Pct";
arrDeck[0, 3] = "153";
arrDeck[1, 0] = "a2s";
arrDeck[1, 1] = "You need 3 callers in an unraised pot. You need 4 callers in a raised pot.";
arrDeck[1, 2] = "12.7 Pct";
arrDeck[1, 3] = "39";
}
How do I search to find "a2s" ?
Thanks,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes, the row index is what I needed. Then I can get other columns from the found row.
Thank you,
Thank you,
ASKER
Yes, the row index is what I needed. Then I can get other columns from the found row.
Thank you,
Thank you,
ASKER
Thanks,