Leo
Wed May 07 07:07:53 CDT 2008
Hello Charles,
With && if the frist part is false the second part is not evaluated AKA
"short circuit evaluation".
With a single & the second part is evaluated unconditionally.
http://msdn.microsoft.com/en-us/library/2a723cdk(VS.71).aspx
Regards,
Leo
"Charles Law" <blank@nowhere.com> wrote in message
news:%23R3JFlDsIHA.3804@TK2MSFTNGP02.phx.gbl...
> This is a very basic question, but I can' turn up a statement on the
> subject:
>
> In C#, if I have
>
> If (x == 1 && y == 2)
> {
> ...
> }
>
> Suppose x is not equal to 1, does the logical test for y == 2 still get
> executed?
>
> TIA
>
> Charles
>
>