 | DateTimeExtensionsGetRandom Method (DateTime, DateTime) |
Returns a random date/time value between the values specified
Namespace:
TestHelperExtensions
Assembly:
CBI.TestHelperExtensions (in CBI.TestHelperExtensions.dll) Version: 2.1.0.1
Syntaxpublic static DateTime GetRandom(
this DateTime maxValue,
DateTime minValue
)
<ExtensionAttribute>
Public Shared Function GetRandom (
maxValue As DateTime,
minValue As DateTime
) As DateTime
public:
[ExtensionAttribute]
static DateTime GetRandom(
DateTime maxValue,
DateTime minValue
)
[<ExtensionAttribute>]
static member GetRandom :
maxValue : DateTime *
minValue : DateTime -> DateTime
Parameters
- maxValue
- Type: SystemDateTime
The date/time that the random value should fall before. - minValue
- Type: SystemDateTime
The date/time that the random value should fall after
Return Value
Type:
DateTimeA DateTime structure representing a random moment in time
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
DateTime. 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).
See Also