I have used a MultiDimesional Array as follows
string[,] Columns = { { \"clientA\", \"clientB\" }}
if (Columns.Length != 0)
{
This should work:
string[][] Columns = {
new string[] { "ClientA", "ClientB" }
};
If you need to add more elements to the array, it should look like this:
string[][] Columns = {
new string[] { "ClientA", "ClientB" },
new string[] { "ClientC", "ClientD" },
new string[] { "ClientE", "ClientF" }
};
Then you can access each element with the code below
Columns[0][0] // Client A
Columns[0][1] // Client B
Columns[1][0] // Client C
Columns[1][1] // Client D
// etc.
A jagged array is an array of arrays, so you change your definition to:
string[][] Columns = { new string[] { "clientA", "clientB" }};
Change array access from...
var value = Columns[0,0];
...to...
var value = Columns[0][0];
You also have the option to suppress the warning (right-click on it and select the option you need). According to MSDN, this is a warning that is safe to suppress in certain cases. Check if yours is such a case before you change the code.