System.Object
EPLAN.Harness.API.ApiProperties.Property
EPLAN.Harness.API.ApiProperties.UnitProperties.UnitClassProperty
EPLAN.Harness.API.ApiProperties.DensityProperty
System.Object
EPLAN.Harness.API.ApiProperties.Property
EPLAN.Harness.API.ApiProperties.UnitProperties.UnitClassProperty
EPLAN.Harness.API.ApiProperties.DensityProperty
public class DensityProperty : EPLAN.Harness.API.ApiProperties.UnitProperties.UnitClassProperty
Represents a property with a density value.
Class provides a method to convert values between units.
DensityProperty density = new DensityProperty(870, Unit.KilogramPerCubicMeter); Console.WriteLine(density); density.Convert(Unit.GramPerCubicCentimeter); Console.WriteLine(density.ToString()); density = "230 lb/in3"; Console.WriteLine(density); Console.WriteLine($"Value: {(double)density.Value}, Unit: {density.Unit}"); // Results: // 870 kg/m3 // 0,87 g/cm3 // 230 lb/in3 // Value: 230, Unit: PoundPerCubicInch
Name | Description | |
---|---|---|
DensityProperty 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 DensityProperty. |
Subtraction | Subtracts two properties. |