Files
Learn-WinUI-3-Second-Edition/Chapter13/Complete/UnoMediaCollection/UnoMediaCollection.DataContracts/WeatherForecast.cs
T
2023-09-16 16:30:52 -04:00

16 lines
634 B
C#

namespace UnoMediaCollection.DataContracts
{
/// <summary>
/// A Weather Forecast for a specific date
/// </summary>
/// <param name="Date">Gets the Date of the Forecast.</param>
/// <param name="TemperatureC">Gets the Forecast Temperature in Celsius.</param>
/// <param name="Summary">Get a description of how the weather will feel.</param>
public record WeatherForecast(DateOnly Date, double TemperatureC, string? Summary)
{
/// <summary>
/// Gets the Forecast Temperature in Fahrenheit
/// </summary>
public double TemperatureF => 32 + (TemperatureC * 9 / 5);
}
}