Random.NextInteger 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
NextInteger<T>()
- Source:
- Random.cs
public:
generic <typename T>
where T : System::Numerics::IBinaryInteger<T>, System::Numerics::IMinMaxValue<T> T NextInteger();
public T NextInteger<T>() where T : System.Numerics.IBinaryInteger<T>, System.Numerics.IMinMaxValue<T>;
member this.NextInteger : unit -> 'T (requires 'T :> System.Numerics.IBinaryInteger<'T> and 'T :> System.Numerics.IMinMaxValue<'T>)
Public Function NextInteger(Of T As {IBinaryInteger(Of T), IMinMaxValue(Of T)}) () As T
类型参数
- T
返回
T
适用于
NextInteger<T>(T)
- Source:
- Random.cs
public:
generic <typename T>
where T : System::Numerics::IBinaryInteger<T> T NextInteger(T maxValue);
public T NextInteger<T>(T maxValue) where T : System.Numerics.IBinaryInteger<T>;
member this.NextInteger : 'T -> 'T (requires 'T :> System.Numerics.IBinaryInteger<'T>)
Public Function NextInteger(Of T As IBinaryInteger(Of T)) (maxValue As T) As T
类型参数
- T
参数
- maxValue
- T
返回
T
适用于
NextInteger<T>(T, T)
- Source:
- Random.cs
public:
generic <typename T>
where T : System::Numerics::IBinaryInteger<T> T NextInteger(T minValue, T maxValue);
public T NextInteger<T>(T minValue, T maxValue) where T : System.Numerics.IBinaryInteger<T>;
member this.NextInteger : 'T * 'T -> 'T (requires 'T :> System.Numerics.IBinaryInteger<'T>)
Public Function NextInteger(Of T As IBinaryInteger(Of T)) (minValue As T, maxValue As T) As T
类型参数
- T
参数
- minValue
- T
- maxValue
- T
返回
T