RandomExtensionsNextTimeOnly Method
Returns a random
TimeOnly that is between the specified range.
Namespace: KGySoft.CoreLibrariesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
public static TimeOnly NextTimeOnly(
this Random random,
TimeOnly? minValue = null,
TimeOnly? maxValue = null
)
<ExtensionAttribute>
Public Shared Function NextTimeOnly (
random As Random,
Optional minValue As TimeOnly? = Nothing,
Optional maxValue As TimeOnly? = Nothing
) As TimeOnly
public:
[ExtensionAttribute]
static TimeOnly NextTimeOnly(
Random^ random,
Nullable<TimeOnly> minValue = nullptr,
Nullable<TimeOnly> maxValue = nullptr
)
[<ExtensionAttribute>]
static member NextTimeOnly :
random : Random *
?minValue : Nullable<TimeOnly> *
?maxValue : Nullable<TimeOnly>
(* Defaults:
let _minValue = defaultArg minValue null
let _maxValue = defaultArg maxValue null
*)
-> TimeOnly
- random Random
- The Random instance to use.
- minValue NullableTimeOnly (Optional)
- The inclusive lower bound of the random TimeOnly returned or to use TimeOnly.MinValue. This parameter is optional.
Default value: . - maxValue NullableTimeOnly (Optional)
- The inclusive upper bound of the random TimeOnly returned or to use TimeOnly.MaxValue. This parameter is optional.
Default value: .
TimeOnlyA
TimeOnly value that is in the specified range.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).