Click or drag to resize

Temperature Structure

Represents a temperature, in Kelvin, as a double-precision floating-point number.
Inheritance Hierarchy
SystemObject
  SystemValueType
    GSF.UnitsTemperature

Namespace: GSF.Units
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.181-beta
Syntax
View Source

The Temperature type exposes the following members.

Constructors
 NameDescription
Public methodTemperature Creates a new Temperature.
Top
Methods
 NameDescription
Public methodCompareTo(Double) Compares this instance to a specified Double and returns an indication of their relative values.
Public methodCompareTo(Object) Compares this instance to a specified object and returns an indication of their relative values.
Public methodCompareTo(Temperature) Compares this instance to a specified Temperature and returns an indication of their relative values.
Public methodStatic memberConvertFrom Converts the value in the specified sourceUnit to a new Temperature in Kelvin.
Public methodConvertTo Converts the Temperature to the specified targetUnit.
Public methodEquals(Double) Returns a value indicating whether this instance is equal to a specified Double value.
Public methodEquals(Object) Returns a value indicating whether this instance is equal to a specified object.
(Overrides ValueTypeEquals(Object))
Public methodEquals(Temperature) Returns a value indicating whether this instance is equal to a specified Temperature value.
Public methodStatic memberFromCelsius Creates a new Temperature value from the specified value in Celsius.
Public methodStatic memberFromDelisle Creates a new Temperature value from the specified value in Delisle.
Public methodStatic memberFromFahrenheit Creates a new Temperature value from the specified value in Fahrenheit.
Public methodStatic memberFromNewton Creates a new Temperature value from the specified value in Newton.
Public methodStatic memberFromRankine Creates a new Temperature value from the specified value in Rankine.
Public methodStatic memberFromRéaumur Creates a new Temperature value from the specified value in Réaumur.
Public methodStatic memberFromRømer Creates a new Temperature value from the specified value in Rømer.
Public methodGetHashCode Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodGetTypeCode Returns the TypeCode for value type Double.
Public methodStatic memberParse(String) Converts the string representation of a number to its Temperature equivalent.
Public methodStatic memberParse(String, NumberStyles) Converts the string representation of a number in a specified style to its Temperature equivalent.
Public methodStatic memberParse(String, IFormatProvider) Converts the string representation of a number in a specified culture-specific format to its Temperature equivalent.
Public methodStatic memberParse(String, NumberStyles, IFormatProvider) Converts the string representation of a number in a specified style and culture-specific format to its Temperature equivalent.
Public methodToCelsius Gets the Temperature value in Celsius.
Public methodToDelisle Gets the Temperature value in Delisle.
Public methodToFahrenheit Gets the Temperature value in Fahrenheit.
Public methodToNewton Gets the Temperature value in Newton.
Public methodToRankine Gets the Temperature value in Rankine.
Public methodToRéaumur Gets the Temperature value in Réaumur.
Public methodToRømer Gets the Temperature value in Rømer.
Public methodToString Converts the numeric value of this instance to its equivalent string representation.
(Overrides ValueTypeToString)
Public methodToString(IFormatProvider) Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information.
Public methodToString(String) Converts the numeric value of this instance to its equivalent string representation, using the specified format.
Public methodToString(String, IFormatProvider) Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information.
Public methodStatic memberTryParse(String, Temperature) Converts the string representation of a number to its Temperature equivalent. A return value indicates whether the conversion succeeded or failed.
Public methodStatic memberTryParse(String, NumberStyles, IFormatProvider, Temperature) Converts the string representation of a number in a specified style and culture-specific format to its Temperature equivalent. A return value indicates whether the conversion succeeded or failed.
Top
Operators
 NameDescription
Public operatorStatic memberAddition(Temperature, Temperature) Returns computed sum of values.
Public operatorStatic memberDivision(Temperature, Temperature) Returns computed division of values.
Public operatorStatic memberEquality(Temperature, Temperature) Compares the two values for equality.
Public operatorStatic memberExponent(Temperature, Temperature) Returns result of first value raised to power of second value.
Public operatorStatic memberGreaterThan(Temperature, Temperature) Returns true if left value is greater than right value.
Public operatorStatic memberGreaterThanOrEqual(Temperature, Temperature) Returns true if left value is greater than or equal to right value.
Public operatorStatic member(Double to Temperature) Implicitly converts value, represented in Kelvin, to a Temperature.
Public operatorStatic member(Temperature to Double) Implicitly converts Temperature, represented in Kelvin, to a Double.
Public operatorStatic memberInequality(Temperature, Temperature) Compares the two values for inequality.
Public operatorStatic memberLessThan(Temperature, Temperature) Returns true if left value is less than right value.
Public operatorStatic memberLessThanOrEqual(Temperature, Temperature) Returns true if left value is less or equal to than right value.
Public operatorStatic memberModulus(Temperature, Temperature) Returns computed remainder after dividing first value by the second.
Public operatorStatic memberMultiply(Temperature, Temperature) Returns computed product of values.
Public operatorStatic memberSubtraction(Temperature, Temperature) Returns computed difference of values.
Top
Fields
 NameDescription
Public fieldStatic memberMaxValueRepresents the largest possible value of a Temperature. This field is constant.
Public fieldStatic memberMinValueRepresents the smallest possible value of a Temperature. This field is constant.
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
Remarks
This class behaves just like a Double representing a temperature in Kelvin; it is implicitly castable to and from a Double and therefore can be generally used "as" a double, but it has the advantage of handling conversions to and from other temperature representations, specifically Celsius, Fahrenheit, Newton, Rankine, Delisle, Réaumur and Rømer.
Example
This example converts Celsius to Fahrenheit:
C#
public double GetFahrenheit(double celsius)
{
    return Temperature.FromCelsius(celsius).ToFahrenheit();
}
See Also