<Code Lib>
M

UnitFormatUtils.TryParse(Units, ForgeTypeId, String, Double)

Description:
Parses a formatted string into a number with units if possible.

public static bool TryParse(
	Units units,
	ForgeTypeId specTypeId,
	string stringToParse,
	out double value
)

  • units
    The units formatting settings, typically obtained from Document.GetUnits().
  • specTypeId
    Identifier of the target spec for the value.
  • String
    stringToParse
    The string to parse.
  • Double%
    value
    The parsed value. Ignore this value if the function returns false.
Return Value Boolean True if the string can be parsed, false otherwise.

Loading…