Temperature Structure |
[SerializableAttribute] public struct Temperature : IComparable, IFormattable, IConvertible, IComparable<Temperature>, IComparable<double>, IEquatable<Temperature>, IEquatable<double>
The Temperature type exposes the following members.
Name | Description | |
---|---|---|
Temperature | Creates a new Temperature. |
Name | Description | |
---|---|---|
CompareTo(Double) | Compares this instance to a specified Double and returns an indication of their relative values. | |
CompareTo(Object) | Compares this instance to a specified object and returns an indication of their relative values. | |
CompareTo(Temperature) | Compares this instance to a specified Temperature and returns an indication of their relative values. | |
ConvertFrom | Converts the value in the specified sourceUnit to a new Temperature in Kelvin. | |
ConvertTo | Converts the Temperature to the specified targetUnit. | |
Equals(Double) | Returns a value indicating whether this instance is equal to a specified Double value. | |
Equals(Object) |
Returns a value indicating whether this instance is equal to a specified object.
(Overrides ValueTypeEquals(Object)) | |
Equals(Temperature) | Returns a value indicating whether this instance is equal to a specified Temperature value. | |
FromCelsius | Creates a new Temperature value from the specified value in Celsius. | |
FromDelisle | Creates a new Temperature value from the specified value in Delisle. | |
FromFahrenheit | Creates a new Temperature value from the specified value in Fahrenheit. | |
FromNewton | Creates a new Temperature value from the specified value in Newton. | |
FromRankine | Creates a new Temperature value from the specified value in Rankine. | |
FromRéaumur | Creates a new Temperature value from the specified value in Réaumur. | |
FromRømer | Creates a new Temperature value from the specified value in Rømer. | |
GetHashCode |
Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode) | |
GetType | Gets the Type of the current instance. (Inherited from Object) | |
GetTypeCode | Returns the TypeCode for value type Double. | |
Parse(String) | Converts the string representation of a number to its Temperature equivalent. | |
Parse(String, NumberStyles) | Converts the string representation of a number in a specified style to its Temperature equivalent. | |
Parse(String, IFormatProvider) | Converts the string representation of a number in a specified culture-specific format to its Temperature equivalent. | |
Parse(String, NumberStyles, IFormatProvider) | Converts the string representation of a number in a specified style and culture-specific format to its Temperature equivalent. | |
ToCelsius | Gets the Temperature value in Celsius. | |
ToDelisle | Gets the Temperature value in Delisle. | |
ToFahrenheit | Gets the Temperature value in Fahrenheit. | |
ToNewton | Gets the Temperature value in Newton. | |
ToRankine | Gets the Temperature value in Rankine. | |
ToRéaumur | Gets the Temperature value in Réaumur. | |
ToRømer | Gets the Temperature value in Rømer. | |
ToString |
Converts the numeric value of this instance to its equivalent string representation.
(Overrides ValueTypeToString) | |
ToString(IFormatProvider) | Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information. | |
ToString(String) | Converts the numeric value of this instance to its equivalent string representation, using the specified format. | |
ToString(String, IFormatProvider) | Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information. | |
TryParse(String, Temperature) | Converts the string representation of a number to its Temperature equivalent. A return value indicates whether the conversion succeeded or failed. | |
TryParse(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. |
Name | Description | |
---|---|---|
Addition(Temperature, Temperature) | Returns computed sum of values. | |
Division(Temperature, Temperature) | Returns computed division of values. | |
Equality(Temperature, Temperature) | Compares the two values for equality. | |
Exponent(Temperature, Temperature) | Returns result of first value raised to power of second value. | |
GreaterThan(Temperature, Temperature) | Returns true if left value is greater than right value. | |
GreaterThanOrEqual(Temperature, Temperature) | Returns true if left value is greater than or equal to right value. | |
(Double to Temperature) | Implicitly converts value, represented in Kelvin, to a Temperature. | |
(Temperature to Double) | Implicitly converts Temperature, represented in Kelvin, to a Double. | |
Inequality(Temperature, Temperature) | Compares the two values for inequality. | |
LessThan(Temperature, Temperature) | Returns true if left value is less than right value. | |
LessThanOrEqual(Temperature, Temperature) | Returns true if left value is less or equal to than right value. | |
Modulus(Temperature, Temperature) | Returns computed remainder after dividing first value by the second. | |
Multiply(Temperature, Temperature) | Returns computed product of values. | |
Subtraction(Temperature, Temperature) | Returns computed difference of values. |
Name | Description | |
---|---|---|
MaxValue | Represents the largest possible value of a Temperature. This field is constant. | |
MinValue | Represents the smallest possible value of a Temperature. This field is constant. |
Name | Description | |
---|---|---|
GetEnumValueOrDefault |
Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions) | |
GetEnumValueOrDefaultT |
Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions) |
public double GetFahrenheit(double celsius) { return Temperature.FromCelsius(celsius).ToFahrenheit(); }