Which one out of the following two should be preferred while doing && operation on two values.
if (!StartTime.Equals(DateTime.MinValue) &&
!CreationTime.Equals(DateTime.MinValue))
Or
if (!(StartTime.Equals(DateTime.MinValue) && CreationTime.Equals(DateTime.MinValue))
What is the difference between the two?
Personally I use the former, I find it easier to read if as much information as possible is as close to the point I need it as possible.
For instance, just now I was wondering if your question was whether it was better to put the expression on two lines or just one, until I noticed the part about the not and the parenthesis.
That is, provided they mean the same, which your expressions doesn’t.
ie.
is not the same as:
Rather: