I have a hashtable which stores all the lines of a paragraph at different indices.
Next,I want to split each line in the hashtable based on comma.

My Code:
foreach(DictionaryEntry entry in h1)
{
string val = (string)entry.Value;
string[] synonyms=val.Split(',');
string variable=synonyms[0];
/*works fine till here*/
int i=1
while(true)
{
Console.WriteLine(synonyms[i]);
i++;
}
}

What I want to do is once the line is split based on comma, each part is saved as an array..
In a string called variable, I am assigning part0..
Then I want to use a loop for parsing the parts from index 1 onwards..
Whenever I try to do that I get unhandled exceptions...