Beispiel #1
0
        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.AppendLine($"City: {City}");
            sb.AppendLine($"Country: {Country}");
            sb.AppendLine($"Temperature: {Temperature}");
            sb.AppendLine($"Sunrise: {Sunrise.ToLongDateString()} {Sunrise.ToLongTimeString()}");
            sb.AppendLine($"Sunset: {Sunset.ToLongDateString()} {Sunset.ToLongTimeString()}");
            return(sb.ToString());
        }
        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.AppendLine($"City: {City}");
            sb.AppendLine($"Coordinates: {Coordinates}");
            sb.AppendLine($"Country: {Country}");
            sb.AppendLine($"Temperature: {Temperature}");
            sb.AppendLine($"Humidity: {Humidity}");
            sb.AppendLine($"Pressure: {Pressure}");
            sb.AppendLine($"Wind: {Wind}");
            sb.AppendLine($"Cloud: {Cloud}");
            sb.AppendLine($"Visibility: {Visibility}");
            sb.AppendLine($"Sunrise: {Sunrise.ToLongDateString()} {Sunrise.ToLongTimeString()}");
            sb.AppendLine($"Sunset: {Sunset.ToLongDateString()} {Sunset.ToLongTimeString()}");
            return(sb.ToString());
        }