Try something like this:
string s = "3,dac,fsdfsdf,DdsA 102-13,62.560000000000002,1397,bes,165/70/R13,945,1380,Break,10"
string[] words = s.Split(',');
foreach (string word in words)
{
Console.WriteLine(word);
}
The string.Split() method will return an array of strings, and via the parameter you can specify the character by which it should split the original string.
Update:
Okay, please see this answer.
Slightly modified code from there:
public IEnumerable<string> SplitCSV(string input)
{
Regex csvSplit = new Regex("(?:^|,)(\"(?:[^\"]+|\"\")*\"|[^,]*)", RegexOptions.Compiled);
foreach (Match match in csvSplit.Matches(input))
{
yield return match.Value.TrimStart(',');
}
}
string s = "3,\"dac\",\"fsdf,sdf\",\"DdsA 102-13\",62.560000000000002,\"1397\",\"bes\",\"165/70/R13\",945,1380,\"Break\",10";
var words = SplitCSV(s);
foreach (string word in words)
{
Console.WriteLine(word);
}
On how to apply this to all lines in a file:
var lines = System.IO.File.ReadAllLines(@"inputfile.txt");
foreach (var line in lines)
{
var wordsInLine = SplitCSV(line);
// do whatever you want with the result...
}