Skip to main content

Class TemperatureExtensions

Provides extension methods for creating Temperature instances.

Assembly: Meadow.Units.dll
View Source
public static class TemperatureExtensions

Methods

Fahrenheit(double)

Creates a Temperature instance with the specified value in Fahrenheit.

View Source
public static Temperature Fahrenheit(this double v)
Returns

Meadow.Units.Temperature: A new Temperature instance with the specified value.

Parameters
TypeNameDescription
System.DoublevThe value of temperature in Fahrenheit as a double.

Celsius(double)

Creates a Temperature instance with the specified value in Celsius.

View Source
public static Temperature Celsius(this double v)
Returns

Meadow.Units.Temperature: A new Temperature instance with the specified value.

Parameters
TypeNameDescription
System.DoublevThe value of temperature in Celsius as a double.

Fahrenheit(int)

Creates a Temperature instance with the specified value in Fahrenheit.

View Source
public static Temperature Fahrenheit(this int v)
Returns

Meadow.Units.Temperature: A new Temperature instance with the specified value.

Parameters
TypeNameDescription
System.Int32vThe value of temperature in Fahrenheit as an integer.

Celsius(int)

Creates a Temperature instance with the specified value in Celsius.

View Source
public static Temperature Celsius(this int v)
Returns

Meadow.Units.Temperature: A new Temperature instance with the specified value.

Parameters
TypeNameDescription
System.Int32vThe value of temperature in Celsius as an integer.