I need to convert a string array into a 2 dimensional char array
Example: My string array looks like
string[] months = {"January", "February", "March"....};
I want to convert it into a char[,] something like this (not sure about syntax)
char[][] = {
{'J','a','n','u','a','r','y'},
{'F','e','b','r','u','a','r','y'},
{'M','a','r','c','h'}
};
what is the best way to achieve this?
char[,]is a rectangular array, meaning each dimension has the same length. That is not the case in your example. You could convert it to achar[][][,]or[][]? in the first case you probably would need to fill the missing items with empty stringschar[,]?