UnitFormatUtils.TryParse
Description:
Parses a formatted string into a number with units if possible.
Parses a formatted string into a number with units if possible.
Overloads (4):
public static bool TryParse(
Units units,
ForgeTypeId specTypeId,
string stringToParse,
out double value
)
-
unitsThe units formatting settings, typically obtained from Document.GetUnits().
-
specTypeIdIdentifier of the target spec for the value.
-
StringstringToParseThe string to parse.
-
Double%valueThe parsed value. Ignore this value if the function returns false.
-
specTypeId is not a measurable spec identifier. See UnitUtils.IsMeasurableSpec(ForgeTypeId).
-
A non-optional argument was null