Microsoft.VisualBasic.FileIO.TextFieldParser
private IEnumerable<string> SplitCsvText(string input) { var result = new List<string>(); var insideQuotes = false; var pos1 = 0; for (int i = 0; i < input.Length; i++) { if (input[i] == quote) { insideQuotes = !insideQuotes; } else if (input[i] == comma && !insideQuotes) { var item = input.Substring(pos1, i - pos1).Trim(); if (item.Length > 0) result.Add(item); pos1 = i + 1; } } return result; }