Boolean.Parse Method
.NET Framework 2.0
Converts the specified string representation of a logical value to its Boolean equivalent.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly: mscorlib (in mscorlib.dll)
| Exception type | Condition |
|---|---|
| value is a null reference (Nothing in Visual Basic). | |
| value is not equivalent to TrueString or FalseString. |
The following code example illustrates the use of Parse method.
Boolean val;
String^ input;
input = Boolean::TrueString;
val = Boolean::Parse( input );
Console::WriteLine( "{0} parsed as {1}", input, val );
boolean val;
String input;
input = System.Boolean.TrueString ;
val = System.Boolean.Parse(input);
Console.WriteLine("{0} parsed as {1}", input, (System.Boolean)val);
var val : Boolean; var input : String; input = Boolean.TrueString; val = Boolean.Parse(input); Console.WriteLine("{0} parsed as {1}", input, val);
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Community Additions
ADD
Show: