Based on your code and the tutorial, it looks like you're trying to mark a random cell as visited. I think you should try this instead:
public class Map
{
private readonly bool[, ] cells;
public Point PickRandomCellAndMarkItVisited()
{
Random rnd = new Random();
Point randomLocation = new Point(rnd.Next(1, 10), rnd.Next(1, 10));
this.cells[randomLocation.X, randomLocation.Y] = true;
return randomLocation;
}
}
This will pick a random cell from the grid and mark the corresponding boolean value as true.