Home Cooker Classes Others Rice CookerGX
Classes  >  datetime  >  Equal(datetime)
datetime class : Equal(datetime) method

Description

Gets the value that indicates whether the argument and the invoker are the same date and time.

Syntax

datetimeInstance.Equal(datetime argDatetime)

Arguments

ClassNameDescription
datetimeargDatetimeA datetime type instance that is compared.

Return value

ClassDescription
boolIf the argument and the invoker are the same date and time, return true. Otherwise, return false.

Sample code

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

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

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

bool eq1 = dt.Equal(dt);//true

bool eq2 = dt.Equal(dt2);//true

bool eq3 = dt.Equal(dtt);//false

Notes

None

Links for reference

None

Copyright © Rice All rights reserved.