mirror of
https://github.com/PacktPublishing/Learn-WinUI-3-Second-Edition.git
synced 2026-06-20 12:23:09 +00:00
16 lines
634 B
C#
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);
|
|
}
|
|
} |