Click or drag to resize

RandomUInt16Between Method

Generates a cryptographically strong unsigned 16-bit random integer between specified values. i.e. [startNumber-stopNumber)

Namespace: GSF.Security.Cryptography
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.258-beta+f8b6aa3dbfe0b4cc2b0b0760dd5d2a3dd4f59d09
Syntax
public static ushort UInt16Between(
	ushort startNumber,
	ushort stopNumber
)
View Source

Parameters

startNumber  UInt16
A UInt16 that is the low end of our range.
stopNumber  UInt16
A UInt16 that is the high end of our range.

Return Value

UInt16
A UInt16 that is generated between the startNumber and the stopNumber.
Exceptions
ExceptionCondition
CryptographicExceptionThe cryptographic service provider (CSP) cannot be acquired.
See Also