[]
        
(Showing Draft Content)

GrapeCity.Documents.Common.Unit.StringToUnitType

StringToUnitType Method

StringToUnitType(string, ref UnitTypeEnum)

Converts a string to a UnitTypeEnum value. The string can be one of the following: "doc", "in", "mm", "pc", "dsp", "pt", "tw", "inhs", "cm", "dip". This method is case-insensitive.

Declaration
public static bool StringToUnitType(string s, ref UnitTypeEnum value)
Public Shared Function StringToUnitType(s As String, ByRef value As UnitTypeEnum) As Boolean
Parameters
Type Name Description
string s

The string to convert.

UnitTypeEnum value

OUT: On exit, contains the UnitTypeEnum value.

Returns
Type Description
bool

true if no error occurred, false otherwise.