static void ShowBox() { bool correctinput = true; I3DStorageObject box = null; int id = -1; do { try { Console.Clear(); Console.WriteLine("Enter id to see content of a box:"); id = int.Parse(Console.ReadLine()); correctinput = true; } catch (Exception ex) { Console.WriteLine(ex.Message); Console.ReadLine(); correctinput = false; } } while (correctinput == false); try { box = _wareHouse.GetBoxByID(id); } catch (Exception ex) { Console.WriteLine(ex.Message); Console.ReadLine(); } if (box != null) { Console.Clear(); int pos = _wareHouse.GetLocationByID(id); string frontendpos = _wareHouse.GetFrontedLocation(pos); Console.WriteLine($"Box Location: {frontendpos}"); Console.WriteLine(box.ToString()); Console.ReadLine(); } }