System.Object
EPLAN.Harness.API.ApiProperties.Property
EPLAN.Harness.API.ApiProperties.UnitProperties.UnitClassProperty
EPLAN.Harness.API.ApiProperties.TemperatureProperty
System.Object
EPLAN.Harness.API.ApiProperties.Property
EPLAN.Harness.API.ApiProperties.UnitProperties.UnitClassProperty
EPLAN.Harness.API.ApiProperties.TemperatureProperty
public class TemperatureProperty : EPLAN.Harness.API.ApiProperties.UnitProperties.UnitClassProperty
Represents a property with a temperature value.
Class provides a method to convert values between units.
TemperatureProperty temperature = new TemperatureProperty(-10, 25, Unit.Celsius); Console.WriteLine(temperature); temperature.Convert(Unit.Fahrenheit); Console.WriteLine(temperature); temperature = "-10°C"; Console.WriteLine(temperature); Console.WriteLine($"Value: {(double)temperature.Value}, Unit: {temperature.Unit}"); // Results: // -10 ~ 25 °C // 14 ~ 77 °F // -10 °C // Value: -10, Unit: Celsius
Name | Description | |
---|---|---|
TemperatureProperty Constructor | Overloaded. |
Name | Description | |
---|---|---|
IsInterval | Specifies whether the property is interval. (Inherited from EPLAN.Harness.API.ApiProperties.Property) | |
Unit | Unit of the value of this property. (Inherited from EPLAN.Harness.API.ApiProperties.Property) | |
Value | Gets the value of this property. (Inherited from EPLAN.Harness.API.ApiProperties.Property) |
Name | Description | |
---|---|---|
Convert | Overridden. Convert a property to the specified unit. | |
Equals | Is this unit class property equal to the following object? (Inherited from EPLAN.Harness.API.ApiProperties.UnitProperties.UnitClassProperty) | |
GetHashCode | Serves as the default hash function. (Inherited from EPLAN.Harness.API.ApiProperties.UnitProperties.UnitClassProperty) | |
ToString | Overloaded. Returns a string that represents the current object. (Inherited from EPLAN.Harness.API.ApiProperties.UnitProperties.UnitClassProperty) |
Addition | Sums two properties. |
Implicit Type Conversion | Implicit conversion from System.String to TemperatureProperty. |
Subtraction | Subtracts two properties. |