I have a problem here, and it seems like my brain has just left the building, so I need you guys to help me. I have an API method that requires a multi-dimensional array of strings. It looks like this:
string[,] specialMacroArray = new string[,] { { "#macro#", "text1" }, {"#secondmacro#", "text2"} }
The contents of the array are computed throughout my method, and therefore I cannot write it as indicated above. So I put the values ββin a list in all my code, for example:
List<string[]> specialMacros = new List<string[]>();
specialMacros.Add(new string[] { "#macro#", text1 });
specialMacros.Add(new string[] { "#secondmacro#", "text2" });
So far so good ... but now I want to convert the list to a multidimensional array. But I canβt figure out how to do this.
specialMacroArray = specialMacros.ToArray()
I am using the .NET 3.5 Framework in C #
Thanx in advance
source
share