FormatOptions.IsValidForUnitType
Description:
Checks whether this FormatOptions is valid for a given unit type.
Checks whether this FormatOptions is valid for a given unit type.
Remarks:
The FormatOptions is valid if UseDefault is true or if the display unit in the FormatOptions is valid for the unit type. See UnitUtils.IsValidDisplayUnit(UnitType, DisplayUnitType) and UnitUtils.GetValidDisplayUnits(UnitType).
The FormatOptions is valid if UseDefault is true or if the display unit in the FormatOptions is valid for the unit type. See UnitUtils.IsValidDisplayUnit(UnitType, DisplayUnitType) and UnitUtils.GetValidDisplayUnits(UnitType).
-
unitTypeThe unit type.
Return Value
bool
True if the FormatOptions is valid, false otherwise.
-
unitType is an invalid unit type. See UnitUtils.IsValidUnitType() and UnitUtils.GetValidUnitTypes().
-
A value passed for an enumeration argument is not a member of that enumeration