I'm creating a program that parses a log file for a user's name and its GUID (Global unique identifier) using regular expressions. So far, my program extracts the data properly, and stores it in a two-column DataTable. Outputting its content with this code:
foreach (DataRow dr in guids.Select("","guid"))
{
Console.WriteLine("GUID {0} has the name '{1}'\n", dr["guid"], dr["name"]);
}
Example output:
GUID c6c4486 has the name 'Daniel'
GUID c6c4486 has the name 'Mark'
GUID adh2j34 has the name 'Sophie'
Works fine, but I would like it to say
GUID c6c4486 has the names 'Daniel' and 'Mark'
GUID adh2j34 has the name 'Sophie'
by using something like a multidimensional array:
players['guidhere'][0] = Daniel;
players['guidhere'][1] = Mark;
Any ideas on how to approach this problem? Should I just use arrays, or is there anything more dynamic?