Boolean.ValueOf Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ValueOf(String) |
Returns a |
ValueOf(Boolean) |
Returns a |
ValueOf(String)
Returns a Boolean
with a value represented by the
specified string.
[Android.Runtime.Register("valueOf", "(Ljava/lang/String;)Ljava/lang/Boolean;", "")]
public static Java.Lang.Boolean ValueOf (string? s);
[<Android.Runtime.Register("valueOf", "(Ljava/lang/String;)Ljava/lang/Boolean;", "")>]
static member ValueOf : string -> Java.Lang.Boolean
Parameters
- s
- String
a string.
Returns
the Boolean
value represented by the string.
- Attributes
Remarks
Returns a Boolean
with a value represented by the specified string. The Boolean
returned represents a true value if the string argument is not null
and is equal, ignoring case, to the string "true"
. Otherwise, a false value is returned, including for a null argument.
Java documentation for java.lang.Boolean.valueOf(java.lang.String)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
See also
Applies to
ValueOf(Boolean)
Returns a Boolean
instance representing the specified
boolean
value.
[Android.Runtime.Register("valueOf", "(Z)Ljava/lang/Boolean;", "")]
public static Java.Lang.Boolean ValueOf (bool b);
[<Android.Runtime.Register("valueOf", "(Z)Ljava/lang/Boolean;", "")>]
static member ValueOf : bool -> Java.Lang.Boolean
Parameters
- b
- Boolean
a boolean value.
Returns
a Boolean
instance representing b
.
- Attributes
Remarks
Returns a Boolean
instance representing the specified boolean
value. If the specified boolean
value is true
, this method returns Boolean.TRUE
; if it is false
, this method returns Boolean.FALSE
. If a new Boolean
instance is not required, this method should generally be used in preference to the constructor #Boolean(boolean)
, as this method is likely to yield significantly better space and time performance.
Added in 1.4.
Java documentation for java.lang.Boolean.valueOf(boolean)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.