System.Object
EPLAN.Harness.API.ApiProperties.Property
EPLAN.Harness.API.ApiProperties.UnitProperties.UnitClassProperty
EPLAN.Harness.API.ApiProperties.LengthProperty
System.Object
EPLAN.Harness.API.ApiProperties.Property
EPLAN.Harness.API.ApiProperties.UnitProperties.UnitClassProperty
EPLAN.Harness.API.ApiProperties.LengthProperty
public class LengthProperty : EPLAN.Harness.API.ApiProperties.UnitProperties.UnitClassProperty
Represents a property with a length value.
Class provides a method to convert values between units.
LengthProperty length = new LengthProperty(250, Unit.Centimeter); Console.WriteLine(length); length.Convert(Unit.Meter); Console.WriteLine(length.ToString()); length = "68 km"; Console.WriteLine(length); Console.WriteLine($"Value: {(double)length.Value}, Unit: {length.Unit}"); // Results: // 250 cm // 2,5 m // 68 km // Value: 68, Unit: Kilometer
Name | Description | |
---|---|---|
LengthProperty 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 | Convert a property to the specified unit. (Inherited from EPLAN.Harness.API.ApiProperties.UnitProperties.UnitClassProperty) | |
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 LengthProperty. |
Subtraction | Subtracts two properties. |