Boolean.Parse Method
.NET Framework 3.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)
public static boolean Parse ( String value )
public static function Parse ( value : String ) : boolean
Not applicable.
Parameters
- value
A string containing the value to convert.
Return Value
true if value is equivalent to TrueString; otherwise, false.| 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 Server 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 Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: