ThreadLocalRandom.NextLong 方法

定义

重载

名称 说明
NextLong(Int64)

要添加

NextLong(Int64, Int64)

要添加

NextLong(Int64)

要添加

[Android.Runtime.Register("nextLong", "(J)J", "GetNextLong_JHandler")]
public virtual long NextLong(long bound);
[<Android.Runtime.Register("nextLong", "(J)J", "GetNextLong_JHandler")>]
override this.NextLong : int64 -> int64

参数

bound
Int64

上限(独占)。 必须是正的。

返回

零(非独占)和绑定(独占)之间的伪随机 long

属性

例外

如果 n 不是正值

注解

要添加

适用于 . 的 java.util.concurrent.ThreadLocalRandom.nextLong(long)Java 文档

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

NextLong(Int64, Int64)

要添加

[Android.Runtime.Register("nextLong", "(JJ)J", "GetNextLong_JJHandler")]
public virtual long NextLong(long origin, long bound);
[<Android.Runtime.Register("nextLong", "(JJ)J", "GetNextLong_JJHandler")>]
override this.NextLong : int64 * int64 -> int64

参数

origin
Int64

返回的最小值

bound
Int64

上限(独占)

返回

原点(非独占)和绑定(独占)之间的伪随机 long

属性

例外

如果至少大于或等于绑定

注解

要添加

适用于 . 的 java.util.concurrent.ThreadLocalRandom.nextLong(long, long)Java 文档

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于