private static void ParseFile() { Console.WriteLine("Enter full path and type of delimiters (commas, pipes and spaces)" + ": Ex: d:/abc.txt,commas"); string[] input = Console.ReadLine().Split(','); try { if (_fileParserService.ValidateFileFormat(input)) { IList <Person> unsortedList = _fileParserService.GetPersonList(input); ProcessFile(unsortedList); } } catch (Exception ex) { Console.WriteLine(ex.Message); Console.WriteLine("press any key to exit.."); Console.ReadKey(); } }