 | DateTimeExtensionsGetRandom Method (DateTime) |
Returns a random date/time value earlier than the value specified
Namespace:
TestHelperExtensions
Assembly:
CBI.TestHelperExtensions (in CBI.TestHelperExtensions.dll) Version: 2.1.0.1
Syntaxpublic static DateTime GetRandom(
this DateTime maxValue
)
<ExtensionAttribute>
Public Shared Function GetRandom (
maxValue As DateTime
) As DateTime
public:
[ExtensionAttribute]
static DateTime GetRandom(
DateTime maxValue
)
[<ExtensionAttribute>]
static member GetRandom :
maxValue : DateTime -> DateTime
Parameters
- maxValue
- Type: SystemDateTime
The date/time that the random value should fall before.
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