Click or drag to resize

ByteExtensionsGetRandom Method (Byte, Byte)

Returns a random number greater than or equal to the specified minValue and less than the specified maxValue

Namespace:  TestHelperExtensions
Assembly:  CBI.TestHelperExtensions (in CBI.TestHelperExtensions.dll) Version: 2.1.0.1
Syntax
public static byte GetRandom(
	this byte maxValue,
	byte minValue
)

Parameters

maxValue
Type: SystemByte
The non-inclusive maximum integer value for the random number
minValue
Type: SystemByte
the inclusive minimum integer value for the random number

Return Value

Type: Byte
A random byte

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Byte. 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).
Remarks
255 is not a reachable value here since the maximum value of a byte is 255 and the specified maxValue is non-inclusive.
See Also