Beispiel #1
0
        private static void TryGetDelimiterInput(Delimiters delimiters)
        {
            Console.WriteLine("Enter a single character custom delimiter: ");

            if (char.TryParse(Console.ReadLine(), out char input))
            {
                var customDelimiter = new Delimiter(input, true);
                delimiters.Add(customDelimiter);
            }
            else
            {
                Console.WriteLine("Invalid Input.");
                TryGetDelimiterInput(delimiters);
            }
        }
 public void Add(Delimiter newDelimiter)
 {
     _delimiters.Add(newDelimiter);
 }