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
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