C# Class org.GraphDefined.Vanaheimr.Illias.RandomExtensions

Extension methods for System.Random.
Show file Open project: Vanaheimr/Illias

Public Methods

Method Description
GetBytes ( this Random, UInt16 NumberOfBytes ) : Byte[]

Get an array of random bytes.

GetString ( this Random, UInt16 Length ) : String

Get random string of the given length.

RandomString ( this Random, UInt16 Length ) : String

Method Details

GetBytes() public static method

Get an array of random bytes.
public static GetBytes ( this Random, UInt16 NumberOfBytes ) : Byte[]
Random this The source of randomness.
NumberOfBytes System.UInt16 The number of random bytes to genrate.
return Byte[]

GetString() public static method

Get random string of the given length.
public static GetString ( this Random, UInt16 Length ) : String
Random this The source of randomness.
Length System.UInt16 The the length of the string.
return String

RandomString() public static method

public static RandomString ( this Random, UInt16 Length ) : String
Random this
Length System.UInt16
return String