IRandomGenerator.NextLong 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
| NextLong() |
Returns a pseudorandomly chosen |
| NextLong(Int64) |
Returns a pseudorandomly chosen |
| NextLong(Int64, Int64) |
Returns a pseudorandomly chosen |
NextLong()
Returns a pseudorandomly chosen long value.
[Android.Runtime.Register("nextLong", "()J", "GetNextLongHandler:Java.Util.RandomGenerators.IRandomGeneratorInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)]
public long NextLong();
[<Android.Runtime.Register("nextLong", "()J", "GetNextLongHandler:Java.Util.RandomGenerators.IRandomGeneratorInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)>]
abstract member NextLong : unit -> int64
Returns
a pseudorandomly chosen long value
- Attributes
Remarks
Returns a pseudorandomly chosen long value.
Java documentation for java.util.random.RandomGenerator.nextLong().
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
NextLong(Int64)
Returns a pseudorandomly chosen long value between zero
(inclusive) and the specified bound (exclusive).
[Android.Runtime.Register("nextLong", "(J)J", "GetNextLong_JHandler:Java.Util.RandomGenerators.IRandomGenerator, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)]
public virtual long NextLong(long bound);
[<Android.Runtime.Register("nextLong", "(J)J", "GetNextLong_JHandler:Java.Util.RandomGenerators.IRandomGenerator, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)>]
abstract member NextLong : int64 -> int64
override this.NextLong : int64 -> int64
Parameters
- bound
- Int64
the upper bound (exclusive) for the returned value. Must be positive.
Returns
a pseudorandomly chosen long value between
zero (inclusive) and the bound (exclusive)
- Attributes
Remarks
Returns a pseudorandomly chosen long value between zero (inclusive) and the specified bound (exclusive).
Java documentation for java.util.random.RandomGenerator.nextLong(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
NextLong(Int64, Int64)
Returns a pseudorandomly chosen long value between the
specified origin (inclusive) and the specified bound (exclusive).
[Android.Runtime.Register("nextLong", "(JJ)J", "GetNextLong_JJHandler:Java.Util.RandomGenerators.IRandomGenerator, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)]
public virtual long NextLong(long origin, long bound);
[<Android.Runtime.Register("nextLong", "(JJ)J", "GetNextLong_JJHandler:Java.Util.RandomGenerators.IRandomGenerator, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)>]
abstract member NextLong : int64 * int64 -> int64
override this.NextLong : int64 * int64 -> int64
Parameters
- origin
- Int64
the least value that can be returned
- bound
- Int64
the upper bound (exclusive) for the returned value
Returns
a pseudorandomly chosen long value between the
origin (inclusive) and the bound (exclusive)
- Attributes
Remarks
Returns a pseudorandomly chosen long value between the specified origin (inclusive) and the specified bound (exclusive).
Java documentation for java.util.random.RandomGenerator.nextLong(long, 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.