What is difference between AND & and Logical AND &&? — ASP.Net , csharp — ASP.Net Example
ASP.Net Example-What is difference between AND & and Logical AND &&?

Sunday, October 9, 2011

What is difference between AND & and Logical AND &&?

1. Logical AND Sign is && and AND Sign is  &.
2. Both work is same but Operation Method is Different
for example
if(a==10 && b==10)
here if a =10 then only it going for  checking b value
if a !=10 then condition is not satisfied.
Moral One Operation for checking second values decrases
and in AND & operation
if(a==10 & b==10)
here if a !=10 then also it is checking B value it is not necessary.
Logical AND(&&) is Best.    

2 comments:

  1. The blog was absolutely fantastic! Lots of great information and
    inspiration, both of which we all need!b Keep 'em coming... you all do
    such a great job at such Concepts... can't tell you how much I, for
    one appreciate all you do!

    ReplyDelete
  2. If you have any Question then ask and fill free.
    Do Smart coding.

    ReplyDelete

ASPdotNET-Example