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