
System.Object
EPLAN.Harness.API.ApiProperties.Property
EPLAN.Harness.API.ApiProperties.UnitProperties.UnitClassProperty
EPLAN.Harness.API.ApiProperties.MassProperty
public class MassProperty : EPLAN.Harness.API.ApiProperties.UnitProperties.UnitClassProperty
Represents a property with a mass value.
Class provides a method to convert values between units.
MassProperty mass = new MassProperty(500, Unit.Kilogram); Console.WriteLine(mass); mass.Convert(Unit.Tonne); Console.WriteLine(mass.ToString()); mass = "480 g"; Console.WriteLine(mass); Console.WriteLine($"Value: {(double)mass.Value}, Unit: {mass.Unit}"); // Results: // 500 kg // 0,5 t // 480 g // Value: 480, Unit: Gram
Name | Description | |
---|---|---|
![]() | MassProperty 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) |
![]() | Sums two properties. |
![]() | Implicit conversion from System.String to MassProperty. |
![]() | Subtracts two properties. |