コード例 #1
0
        public void ShowAll()
        {
            // make this one look good later
            List <string> restuarants_list = mh.GetAll();
            int           i = 1;
            int           count;
            string        spaces;       //25

            foreach (var temp in restuarants_list)
            {
                if (i > 10)
                {
                    count = temp.Length + 3;
                }
                else
                {
                    count = temp.Length + 4;
                }
                spaces = new    String(' ', 25 - count);
                Console.Write("|" + i++ + ". " + temp + spaces + " |\n");
            }
            Console.Write("|-------------------------|\n" +
                          ">> ");
        }