Saturday, September 3, 2011

Difference between && and & operator in c#

In c# I always prefer to use && operator than & operator, reason behind can be described efficiency in code execution.

If we use && operator, the second conditional statement (the statement on the right of the &&) will not be executed if the first conditional statement is false. But this is not case when we use & operator

Same is the case while using || and | operator

No comments:

Post a Comment

How to upload app to macOS

1. Open Terminal Press Cmd (⌘) + Space , type Terminal , and hit Enter . 2. Navigate to Your Build Output Directory Your .app file is likel...