List<string[]> list = File.ReadLines("YourFile.txt") .Select(r => r.TrimEnd('#')) .Select(line => line.Split(',')) .ToList();