Equals Method (DateTime, DateTime)
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Returns a value indicating whether two DateTime instances have the same date and time value.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Shared Function Equals ( _
t1 As DateTime, _
t2 As DateTime _
) As Boolean
public static bool Equals(
DateTime t1,
DateTime t2
)
public:
static bool Equals(
DateTime t1,
DateTime t2
)
static member Equals :
t1:DateTime *
t2:DateTime -> bool
public static function Equals(
t1 : DateTime,
t2 : DateTime
) : boolean
Parameters
- t1
Type: System. . :: . .DateTime
The first object to compare.
- t2
Type: System. . :: . .DateTime
The second object to compare.
Return Value
Type: System. . :: . .Boolean
true if the two values are equal; otherwise, false.
Remarks
t1 and t2 are equal if their Ticks property values are equal. Their Kind property values are not considered in the test for equality.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.