 | DateTimeExtensionsTo100MSPrecision Method (DateTime) |
Returns the specified DateTime value truncating the precision
to the previous 100 millisecond increment.
Namespace:
TestHelperExtensions
Assembly:
CBI.TestHelperExtensions (in CBI.TestHelperExtensions.dll) Version: 2.1.0.1
Syntaxpublic static DateTime To100MSPrecision(
this DateTime value
)
<ExtensionAttribute>
Public Shared Function To100MSPrecision (
value As DateTime
) As DateTime
public:
[ExtensionAttribute]
static DateTime To100MSPrecision(
DateTime value
)
[<ExtensionAttribute>]
static member To100MSPrecision :
value : DateTime -> DateTime
Parameters
- value
- Type: SystemDateTime
The DateTime value for which precision should be adjusted.
Return Value
Type:
DateTimeA DateTime value representing the target value modified to be precise only to 100ms.
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).
RemarksIs often used to make DateTime comparisons work better
since a difference in precision between 2 DateTime values will
cause comparisons to fail that should otherwise match.
See Also