I reckon best option would be using .Split() method on line string variable, so it returns a string array that contains the sub-strings delimited by comma and you can have all sub-strings before and after any comma in the instance.
var commaSplitted = line.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
No comments:
Post a Comment