RandomExtensionsNextChar Method
Returns a random
Char value that is within a specified range.
Namespace: KGySoft.CoreLibrariesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
public static char NextChar(
this Random random,
char minValue = '\x0000',
char maxValue = '\xFFFF'
)
<ExtensionAttribute>
Public Shared Function NextChar (
random As Random,
Optional minValue As Char = "\x0000"C,
Optional maxValue As Char = "\xFFFF"C
) As Char
public:
[ExtensionAttribute]
static wchar_t NextChar(
Random^ random,
wchar_t minValue = L'\x0000',
wchar_t maxValue = L'\xFFFF'
)
[<ExtensionAttribute>]
static member NextChar :
random : Random *
?minValue : char *
?maxValue : char
(* Defaults:
let _minValue = defaultArg minValue '\x0000'
let _maxValue = defaultArg maxValue '\xFFFF'
*)
-> char
- random Random
- The Random instance to use.
- minValue Char (Optional)
- The inclusive lower bound of the random character returned. This parameter is optional.
Default value: Char.MinValue. - maxValue Char (Optional)
- The inclusive upper bound of the random character returned. Must be greater or equal to minValue. This parameter is optional.
Default value: Char.MaxValue.
CharA
Char value that is greater than or equal to
minValue and less than or equal to
maxValue.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).