I have a multidimensional jagged string array:
string[,][] MDJA =
{
{new string[]{"a", "b"}, new string[]{"c", "d"}, new string[]{"e", "f"}},
{new string[]{"g", "h"}, new string[]{"j", "i"}, new string[]{"k", "l"}},
{new string[]{"m", "n"}, new string[]{"o", "p"}, new string[]{"q", "r"}}
}
I'm using for-loops to compare the placement of the arrays inside the array to get the array I'm looking for, but the MDJA is inside a method and i would like it to return the specific array. As an example i might want to return
new string[]{"m", "n"}
Normally I would do this in a multidimensional-array:
for (byte i = 0; i < 3; i++)
{
if (var1[x] == var2[i])
{
return answers[y,i]
}
}
But i haven't used jagged arrays before and when using them multidimensionally it made it harder to get information.
P.S The 4 variables are arguments in the method, var1 and var2 are string arrays and x/y are integers.
Thank you for helping.
{"m", "n"}to be returned from a method of signaturestring[] myMethod(string[] var1, string[] var2, int x, int y). What are the parameter values that are supposed to make that happen?