I asked a similar question before but am just asking it from a slightly different angle.
I have a list of codes and underneath each code I have a bunch of values that are taken from the fields Subject and GenSubject.
Problem is these values(especially the general subjects) contain various elements, seperated by ';'. How can I incorperate the split function within the dictionary as to split the various values as I run the query?
while (dbReader.Read())
{
string code = (string)dbReader["CODE"];
string subject = (string)dbReader["SUBJECT"];
string generalSublject = (string)dbReader["GenSubject"];
dict.Add(code, new List<string> { subject,generalSublject });
}
This is the result of which I want to split the values wherever they need splitting.
(I want to split the values before adding them to the dictionary)
Thank you