I need to find a string in a two dimensional array and I don't know how. The code should look like this:
...
Random x = new.Random();
Random y = new.Random();
string[,] array = new string[10,10];
{
for (int i = 0; i < 10; i++)
{
for (int j = 0; j < 10; j++)
{
array[i, j] = "";
}
}
}
array[x.Next(0,10),y.Next(0,10)] = "*";
...
The *
symbol is always in a different spot and I'd like to know how do I find it. Thanks