I thought this would work, but apparently it doesn't. Any suggestions please?
if (c.ArrivalTime = DateTime.MinValue && c.ExpiryTime = DateTime.MinValue)
{
}
then I got this, Operator '&&' cannot be applied to operands of type 'System.DateTime' and 'System.DateTime'
You need to use ==
for equality operations in C#.
Please see section 1.4 Expressions in the C# language specification.
you are missing equality operator ==
Please use this way
if (c.ArrivalTime == DateTime.MinValue && c.ExpiryTime == DateTime.MinValue)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With