RandomExtensionsSampleBigInteger Method
Returns a random
BigInteger that represents an integer of
byteSize bytes.
Namespace: KGySoft.CoreLibrariesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 7.2.0
public static BigInteger SampleBigInteger(
this Random random,
int byteSize,
bool isSigned = false
)
<ExtensionAttribute>
Public Shared Function SampleBigInteger (
random As Random,
byteSize As Integer,
Optional isSigned As Boolean = false
) As BigInteger
public:
[ExtensionAttribute]
static BigInteger SampleBigInteger(
Random^ random,
int byteSize,
bool isSigned = false
)
[<ExtensionAttribute>]
static member SampleBigInteger :
random : Random *
byteSize : int *
?isSigned : bool
(* Defaults:
let _isSigned = defaultArg isSigned false
*)
-> BigInteger
- random Random
- The Random instance to use.
- byteSize Int32
- Determines the range of the generated value in bytes. For example, if this parameter is 1, then
the result will be between 0 and 255 if isSigned is ,
or between -128 and 127 if isSigned is .
- isSigned Boolean (Optional)
- to generate a signed result; otherwise, . This parameter is optional.
Default value: .
BigIntegerA random
BigInteger that represents an integer of
byteSize bytes.In Visual Basic and C#, you can call this method as an instance method on any object of type
Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).