private void ProcessRequest(int threshold) { Console.Write("Enter the ID of the stock you would like to make a request for: "); while (true) { var s = Console.ReadLine(); if (Int32.TryParse(s, out int productID)) { try { c.CreateRequest(currentStoreID, productID, threshold); Console.WriteLine($"Successfully made a request for " + c.GetProductNameByID(productID)); break; } catch (Exception e) { Console.WriteLine(e.Message); } } else { if (!(s == "" || s == "\n")) { Console.WriteLine("You inserted an invalid ID."); } else { break; } } } }