Now, i already split the data. I want to read the data inside the foreach loop (sortedlist) but it always give me error.
while ((read = f.ReadLine()) != null)
{
s1.Append(read);
//read = read.Replace("\r","");
SplitItem = (read).Split(new string []{"\r\n",":"},StringSplitOptions.RemoveEmptyEntries);
foreach (String abc in SplitItem)
{
a += "\r" + abc;
}
// MessageBox.Show(s1.ToString().Trim());
// showFile1.Items.Add(s1.ToString().Trim());
}
// MessageBox.Show(a.ToString().Trim());
foreach (string item in SplitItem)
{
if (!(listItem.ContainsKey(item)))
{
listItem.Add(item, 1);
}
else
{
int count = (int)listItem[item];
listItem[item] = count + 1;
}
}
hope someone can help me..thanks ya