right now i try to convert data from an csv file into an multidimensional array. The data are some simple attributes for playable characters in an DOS consoleapplication (mostly text). The file is build like this
"name; gender; role; hp; selectiontoken"
There are 6 different characters (two for each role). Each character should be a row in the array and every attribute should be a column.
static void Main(string[] args)
{
string[,] values= new string [5,6];
var reader = new StreamReader(File.OpenRead(@"C:\path"));
while (!reader.EndOfStream)
{
string line = reader.ReadLine();
values = line.Split(';'); //Visual C# 2010 Express gives me an error at this position "an implicated conversion between string [] and string [,] is not possible"
}
My question is, how can I split the colums in "line" to give them into "values"?