Converts a String to a Boolean.
[Visual Basic] Public Shared Function Parse( _ ByVal value As String _ ) As Boolean [C#] public static bool Parse( string value ); [C++] public: static bool Parse( String* value ); [JScript] public static function Parse( value : String ) : Boolean;
A true or false Boolean value.
Exception Type | Condition |
---|---|
ArgumentException | If the string is null. |
FormatException | If the string does not provide a match as described. |
The Parse method provides a means of converting (parsing) a string into a Boolean.
The return value is true if the string is a case-insensitive match for "true", or false if it is a case-insensitive match for "false". Leading and trailing white space is allowed.