Random.NextInt64 Método

Definição

Sobrecargas

Name Descrição
NextInt64()

Devolve um inteiro aleatório não negativo.

NextInt64(Int64)

Devolve um inteiro aleatório não negativo que é inferior ao máximo especificado.

NextInt64(Int64, Int64)

Devolve um inteiro aleatório que está dentro de um intervalo especificado.

NextInt64()

Origem:
Random.cs
Origem:
Random.cs
Origem:
Random.cs
Origem:
Random.cs
Origem:
Random.cs

Devolve um inteiro aleatório não negativo.

public:
 virtual long NextInt64();
public virtual long NextInt64();
abstract member NextInt64 : unit -> int64
override this.NextInt64 : unit -> int64
Public Overridable Function NextInt64 () As Long

Devoluções

Um inteiro com assinatura de 64 bits que seja maior ou igual a 0 e menor que Int64.MaxValue.

Aplica-se a

NextInt64(Int64)

Origem:
Random.cs
Origem:
Random.cs
Origem:
Random.cs
Origem:
Random.cs
Origem:
Random.cs

Devolve um inteiro aleatório não negativo que é inferior ao máximo especificado.

public:
 virtual long NextInt64(long maxValue);
public virtual long NextInt64(long maxValue);
abstract member NextInt64 : int64 -> int64
override this.NextInt64 : int64 -> int64
Public Overridable Function NextInt64 (maxValue As Long) As Long

Parâmetros

maxValue
Int64

O limite superior exclusivo do número aleatório a gerar. maxValue deve ser maior ou igual a 0.

Devoluções

Um inteiro assinado de 64 bits que seja maior ou igual a 0, e menor que maxValue; ou seja, o intervalo de valores de retorno normalmente inclui 0 mas não maxValue. No entanto, se maxValue for igual a 0, maxValue é devolvido.

Exceções

maxValue é inferior a 0.

Aplica-se a

NextInt64(Int64, Int64)

Origem:
Random.cs
Origem:
Random.cs
Origem:
Random.cs
Origem:
Random.cs
Origem:
Random.cs

Devolve um inteiro aleatório que está dentro de um intervalo especificado.

public:
 virtual long NextInt64(long minValue, long maxValue);
public virtual long NextInt64(long minValue, long maxValue);
abstract member NextInt64 : int64 * int64 -> int64
override this.NextInt64 : int64 * int64 -> int64
Public Overridable Function NextInt64 (minValue As Long, maxValue As Long) As Long

Parâmetros

minValue
Int64

O limite inferior inclusivo do número aleatório devolvido.

maxValue
Int64

O limite superior exclusivo do número aleatório devolvido. maxValue deve ser maior ou igual a minValue.

Devoluções

Um inteiro assinado de 64 bits maior ou igual a minValue e menor que maxValue; isto é, o intervalo de valores de retorno inclui minValue mas não maxValue. Se minValor for maxValueigual a , minValue é devolvido.

Exceções

minValue é maior que maxValue.

Aplica-se a