flask
flask
CC#
Created by flask on 3/3/2024 in #help
✅ **Hello, could you help me understand `&`, `&&`, `|`, `||` in C# with this code example:**
Thank you so much for your help 👍
24 replies
CC#
Created by flask on 3/3/2024 in #help
✅ **Hello, could you help me understand `&`, `&&`, `|`, `||` in C# with this code example:**
According to the information I have, & is an ampersand "and", returns false the first time False is triggered, but also counts the remaining expression in memory (not sure what are the use cases for it, maybe I'm wrong about it in the first place). The double ampersand && does not read the rest of the expression the first time False (so a/b>1 gives False, the rest doesn't matter since it's already else), thus working faster.
24 replies