Udostępnij za pośrednictwem


Long.ValueOf Method

Definition

Overloads

ValueOf(Int64)

Returns a Long instance representing the specified long value.

ValueOf(String)

Returns a Long object holding the value of the specified String.

ValueOf(String, Int32)

Returns a Long object holding the value extracted from the specified String when parsed with the radix given by the second argument.

ValueOf(Int64)

Returns a Long instance representing the specified long value.

[Android.Runtime.Register("valueOf", "(J)Ljava/lang/Long;", "")]
public static Java.Lang.Long ValueOf (long l);
[<Android.Runtime.Register("valueOf", "(J)Ljava/lang/Long;", "")>]
static member ValueOf : int64 -> Java.Lang.Long

Parameters

l
Int64

a long value.

Returns

a Long instance representing l.

Attributes

Remarks

Java documentation for java.lang.Long.valueOf(long).

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.

Applies to

ValueOf(String)

Returns a Long object holding the value of the specified String.

[Android.Runtime.Register("valueOf", "(Ljava/lang/String;)Ljava/lang/Long;", "")]
public static Java.Lang.Long ValueOf (string s);
[<Android.Runtime.Register("valueOf", "(Ljava/lang/String;)Ljava/lang/Long;", "")>]
static member ValueOf : string -> Java.Lang.Long

Parameters

s
String

the string to be parsed.

Returns

a Long object holding the value represented by the string argument.

Attributes

Exceptions

if string cannot be parsed as a long value.

Remarks

Java documentation for java.lang.Long.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(String, Int32)

Returns a Long object holding the value extracted from the specified String when parsed with the radix given by the second argument.

[Android.Runtime.Register("valueOf", "(Ljava/lang/String;I)Ljava/lang/Long;", "")]
public static Java.Lang.Long ValueOf (string s, int radix);
[<Android.Runtime.Register("valueOf", "(Ljava/lang/String;I)Ljava/lang/Long;", "")>]
static member ValueOf : string * int -> Java.Lang.Long

Parameters

s
String

the string to be parsed

radix
Int32

the radix to be used in interpreting s

Returns

a Long object holding the value represented by the string argument in the specified radix.

Attributes

Exceptions

if string cannot be parsed as a long value, or radix Character.MAX_RADIX.

Remarks

Java documentation for java.lang.Long.valueOf(java.lang.String, int).

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

  • <xref:Java.Lang.Long.ParseLong(System.String%2c+System.Int32)>

Applies to