Struct Temperature
Temperature related conversions and calculations
Namespace: FpAssistantCore.General
Assembly: FpAssistantCoreScl.dll
Syntax
public struct Temperature
Constructors
View SourceTemperature(Double, TemperatureUnits)
Define temperature with value and a unit
Declaration
public Temperature(double value, TemperatureUnits temperatureUnit)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | |
TemperatureUnits | temperatureUnit |
Properties
View SourceUnit
Temperature unit
Declaration
public readonly TemperatureUnits Unit { get; }
Property Value
Type | Description |
---|---|
TemperatureUnits | Enum value of the temperature unit |
Remarks
A unit can only be set in the constructor
Value
Temperature value
Declaration
public double Value { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Numerical value of the temperature |
Methods
View SourceAsDegreesCelsius()
Temperature in Degrees Celsius
Declaration
public double AsDegreesCelsius()
Returns
Type | Description |
---|---|
System.Double | Value in Celsius |
AsDegreesFahrenheit()
Temperature in Degrees Fahrenheit
Declaration
public double AsDegreesFahrenheit()
Returns
Type | Description |
---|---|
System.Double | Value in Fahrenheit |
ConvertDegreesCelsiusToDegreesFahrenheit(Double)
Convert temperature in Degrees Celsius to Degrees Fahrenheit
Declaration
public static double ConvertDegreesCelsiusToDegreesFahrenheit(double celsius)
Parameters
Type | Name | Description |
---|---|---|
System.Double | celsius |
Returns
Type | Description |
---|---|
System.Double | Value in Fahrenheit |
ConvertDegreesFahrenheitToDegreesCelsius(Double)
Convert temperature in Degrees Fahrenheit to Degrees Celsius
Declaration
public static double ConvertDegreesFahrenheitToDegreesCelsius(double fahrenheit)
Parameters
Type | Name | Description |
---|---|---|
System.Double | fahrenheit | Fahrenheit value |
Returns
Type | Description |
---|---|
System.Double | Value in Fahrenheit |