C#C
C#3y ago
meizuflux

How do I use String.Format with a multidimensional array?

char[,] state = new char[3, 3] {
    {'A', ' ', ' '},
    {' ', ' ', ' '},
    {' ', ' ', ' '}
};
//                                    
// used like                          v I want the first column of the first row here
Console.WriteLine(String.Format("  -> {} ", state))

output should be A
Was this page helpful?