Adam Grande

Adam Grande

  • NA
  • 23
  • 0

a (what i thought) would be simple question

Mar 13 2007 11:25 PM
hi everyone,

i am in the process of porting an application from vb.net to C#.net. i am relatively new using C#.net so please bear with any seemingly stupid questions (there will be alot *sheepish grin*)

i have come to a point where i am converting a subroutine that checks items in a database according to a range of dates, now, the vb code is as follows:


If d1 = Date.MinValue And d2 = Date.MinValue Then

Else

End If

basically, what i am trying to do is make the C# equivalent of the above statement, but because i am so new to c# i am having trouble trying to do such a seemingly simple thing. i was under the impression that the eqivalent of 'and' in C# is '&&'... but it doesnt want to work in C# saying 'operator && cant be applied to datetime'

please somebody help me to understand what im doing wrong, its extremely important.

cheers
adam


Answers (2)