Show / Hide Table of Contents

Struct Temperature

Temperature related conversions and calculations

Namespace: FpAssistantCore.General
Assembly: FpAssistantCoreScl.dll
Syntax
public struct Temperature

Constructors

View Source

Temperature(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 Source

Unit

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

View Source

Value

Temperature value

Declaration
public double Value { get; set; }
Property Value
Type Description
System.Double

Numerical value of the temperature

Methods

View Source

AsDegreesCelsius()

Temperature in Degrees Celsius

Declaration
public double AsDegreesCelsius()
Returns
Type Description
System.Double

Value in Celsius

View Source

AsDegreesFahrenheit()

Temperature in Degrees Fahrenheit

Declaration
public double AsDegreesFahrenheit()
Returns
Type Description
System.Double

Value in Fahrenheit

View Source

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

View Source

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

  • View Source
In This Article
Back to top Copyright 2018-2024 CADology Limited