RandomExtensionsNextRune(Random, Rune, Rune) Method

Returns a random Rune (Unicode character) that is within a specified range.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 7.2.0
C#
public static Rune NextRune(
	this Random random,
	Rune minValue,
	Rune maxValue
)

Parameters

random  Random
The Random instance to use.
minValue  Rune
The inclusive lower bound of the random character returned.
maxValue  Rune
The inclusive upper bound of the random character returned. Must be greater or equal to minValue.

Return Value

Rune
A Rune (Unicode character) that is greater than or equal to minValue and less than or equal to maxValue.

Usage Note

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).

Exceptions

ArgumentNullExceptionrandom is .
ArgumentOutOfRangeExceptionmaxValue is less than minValue.

See Also