public int GetCount(string StringToParse)
{
string[] allLines = StringToParse.Split("\n");
return allLines.Length - 1;
}
//If you need to makes sure there are not duplicates
public int GetCount(string StringToParse)
{
string[] allLines = StringToParse.Split("\n");
List<string> distinctValues = new List<string>();
for(int i=0; i<allLines.Length; i++)
{
if(!distinctValues.Contain
{
distinctValues.Add(allLine
}
}
return distinctValues.Count;
}
Main Topics
Browse All Topics





by: pivarPosted on 2009-10-06 at 04:52:07ID: 25503953
Hi,
Here is an example on how to accomplish that.
/peter
Select allOpen in new window