ArcObjects Library Reference (System)  

IXMLTypeMapper.ToBoolean Method

Converts an XML boolean to a boolean.

[Visual Basic .NET]
Public Function ToBoolean ( _
    ByVal Text As String _
) As Boolean
[C#]
public bool ToBoolean (
    string Text
);
[C++]
HRESULT ToBoolean(
  BSTR Text,
  VARIANT_BOOL* Value
);
[C++]

Parameters

Text [in]   Text is a parameter of type BSTR Value [out, retval]   Value is a parameter of type VARIANT_BOOL

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks


For proper conversion the text string for boolean value must be all lowercase.

For example,

  Dim pXMLTypeMapper as IXMLTypeMapper
  Set pXMLTypeMapper = new XMLTypeMapper 

  Dim strValue as String
  Dim boolValue as Boolean 

  strValue = "true"
  boolValue = pXMLTypeMapper.ToBoolean(strValue) 

See Also

IXMLTypeMapper Interface