Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DateTime Less Than Or Equal Operator

Determines whether one specified DateTime is less than or equal to another specified DateTime.

[Visual Basic]
returnValue = DateTime.op_LessThanOrEqual(t1, t2)
[C#]
public static bool operator <=(
 DateTime t1,
 DateTime t2
);
[C++]
public: static bool op_LessThanOrEqual(
 DateTime t1,
 DateTime t2
);
[JScript]
returnValue = t1 <= t2;

[Visual Basic] In Visual Basic, you can use the operators defined by a type, but you cannot define your own. You can use the Compare method instead of the DateTime less than or equal operator.

[JScript] In JScript, you can use the operators defined by a type, but you cannot define your own.

Arguments [Visual Basic, JScript]

t1
A DateTime.
t2
A DateTime.

Parameters [C#, C++]

t1
A DateTime.
t2
A DateTime.

Return Value

true if t1 is less than or equal to t2; otherwise, false.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

DateTime Structure | DateTime Members | System Namespace | Boolean

Show:
© 2014 Microsoft