Click or drag to resize

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
Syntax
public static DateTime GetRandom(
	this DateTime maxValue
)

Parameters

maxValue
Type: SystemDateTime
The date/time that the random value should fall before.

Return Value

Type: DateTime
A 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