Exemple #1
0
        public override string ToString()
        {
            string visitors = "";

            visitors = String.Format("{0:n0}", Visitors);
            string area = "";

            area = String.Format("{0:n0}", Area);

            return(ParkName.ToString().PadRight(5) + " National Park" + "\n" + "Location: ".PadRight(20) + Location.ToString().PadRight(30) + "\n" + "Established: ".PadRight(20) + EstablishDate.ToShortDateString().PadRight(30) + "\n" +
                   "Area: ".PadRight(20) + area.ToString() + " Sq Km".PadRight(30) + "\n" + "Annual Visitors: ".PadRight(20) + visitors.ToString().PadRight(30) + "\n\n" + Description.ToString().PadRight(30));
        }
Exemple #2
0
 public override string ToString()
 {
     return(ParkName.PadRight(17));
 }
Exemple #3
0
 // Used for viewing the list of all parks. Formats info to look nice
 public override string ToString()
 {
     return(ParkId.ToString().PadRight(3) + ParkName.PadRight(5));
 }
 public override string ToString()
 {
     return($"{ParkId.ToString()} {ParkName.PadRight(10)} {ParkLocation.PadRight(10)} {ParkEstablishDate.ToString().PadRight(10)} {Area.ToString().PadRight(10)} {Visitors.ToString().PadRight(10)} {ParkDescription.PadRight(10)}");
 }
 public override string ToString()
 {
     return(ParkId.ToString().PadRight(6) + ParkName.PadRight(6) + Location.PadRight(12) + EstablishedDate.ToString().PadRight(12) +
            Area.ToString().PadRight(10) + Visitors.ToString().PadRight(10) + "\n" + Description);
 }