public override string ToString()
 {
     return(Name + "\n" +
            "Location: ".PadRight(20) + Location + "\n" +
            "Established: ".PadRight(20) + EstablishDate.ToShortDateString() + "\n" +
            "Area: ".PadRight(20) + Area + " Acres\n" +
            "Annual Visitors: ".PadRight(20) + Visitors + "\n\n" +
            Description + "\n");
 }
Exemplo n.º 2
0
 public override string ToString()
 {
     Console.WriteLine($"\n{Name}\n" +
                       $"Location: {Location}\n" +
                       $"Established: {EstablishDate.ToShortDateString()}\n" +
                       $"Area: {Area} sq.km.\n" +
                       $"Annual Visitors: {AnnualVisitors}\n" +
                       $"\n");
     return(WriteLineWordWrap(Description));
 }
Exemplo n.º 3
0
 public override string ToString()
 {
     return(Name.ToString() + " National Park\n".PadRight(10) + "\nPark ID:".PadRight(25) + ParkId + "\nLocation:".PadRight(25) + Location.ToString() + "\nEstablished:".PadRight(25) + EstablishDate.ToShortDateString() + "\nArea:".PadRight(25) + Area.ToString("N0") + " sq km" + "\nAnnual Visitors:".PadRight(25) + Visitors.ToString("N0") + "\n\n Description: \n \n" + Description);
 }
Exemplo n.º 4
0
 public override string ToString()
 {
     return(ParkId.ToString().PadRight(6) + Name.PadRight(30) + Location.PadRight(30) + EstablishDate.ToShortDateString().PadRight(10) + Area.ToString().PadRight(20) + Visitors.ToString().PadRight(10) + Description.ToString().PadRight(60));
 }
Exemplo n.º 5
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));
        }
 public override string ToString()
 {
     return(ParkID.ToString().PadRight(10) + Name.PadRight(20) + Location.PadRight(20) + "Established: " + EstablishDate.ToShortDateString().PadRight(15) + "Area:" + Area.ToString().PadRight(15) + "Visitors: " + Visitors.ToString().PadRight(15) + "\n\n" + Description);
 }