What is difference between OR (|) and Logical OR (||) ? — ASP.Net Example
ASP.Net Example-What is difference between OR (|) and Logical OR (||) ?

Sunday, October 9, 2011

What is difference between OR (|) and Logical OR (||) ?

1. Logical OR 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 condition is Satisfied and not going checking values of B. 
Moral One Operation for checking second i.e B values decrasesand in AND & operation 
if(a==10 | b==10)
here if a ==10 then also it is checking B value i.e  it is not necessary.    
    
Logical OR(||) is Best.    

3 comments:

  1. Good article

    You can submit your .net related article links on http://www.dotnettechy.com to get more traffic

    ReplyDelete
  2. Thanks for sharing your info. I really appreciate your efforts and I will be waiting for your further write ups thanks once again.
    html5 converter

    ReplyDelete
    Replies
    1. Welcome,
      If you required any help then any questions in comment.

      Delete

ASPdotNET-Example