private static void DeleteMethod(string input, string[] argums, ProductCollection colection) { int index; string input2; index = input.IndexOf(' '); input2 = input.Substring(index + 1); if (!input2.Contains(';')) { string a = argums[1]; int deletedItems = colection.Delete(argums[1]); Console.WriteLine($"{deletedItems} products deleted"); } else { string[] separatedByComma = input2.Split(';'); string name = separatedByComma[0]; string producer = separatedByComma[1]; int deletedItems = colection.Delete(name, producer); if (deletedItems == 0) { Console.WriteLine("No products found"); } else { Console.WriteLine($"{deletedItems} products deleted"); } } }