public Order(string menuName, int menuAmount) { Set set = new Set(); set.setMenu(); int num = 0; foreach (var item in set.Menulist) { if (item.menuName == menuName) { break; } num += 1; } m_menu.menuprice = set.Menulist[num].menuprice; m_menu.menuName = menuName; m_menuAmount = menuAmount; }