RandomExtensionsNextRune(Random, Rune, Rune) Method

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


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


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

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


ArgumentNullExceptionrandom is .
ArgumentOutOfRangeExceptionmaxValue is less than minValue.

See Also