datetime class : Greater(datetime) method

Description

Gets a value that indicates whether the invoker advanced than the argument.

Syntax

datetimeInstance.Greater(datetime argDatetime)

Arguments

ClassNameDescription
datetimeargDatetimeA datetime type instance that is compared.

Return value

ClassDescription
boolA value that indicates whether the invoker advanced than the argument.

Sample code

1:

datetime dt = new datetime(2013,12,14,10,10,9);

2:

datetime dt2 = new datetime(2013,12,14,10,10,8);

3:

datetime dt3 = new datetime(2013,12,14,10,10,10);

4:

bool great1 = dt.Greater(dt); // false

5:

bool great2 = dt.Greater(dt2); // true

6:

bool great3 = dt.Greater(dt3); // false

Notes

If the invoker advanced than the argument, returns true. Otherwise, return false.

Links for reference

None.

Copyright © Cooker All rights reserved.