This document is archived and information here might be outdated.  Recommended version.


IXMLTypeMapper.ToBoolean Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > System > ESRI.ArcGIS.esriSystem > Interfaces > IX > IXMLTypeMapper Interface > IXMLTypeMapper.ToBoolean Method
ArcGIS Developer Help

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
);
[C++]
Parameters
Text [in]

Text is a parameter of type BSTR

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