KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have used the single ampersand (&) in C# to mean "check the second conditional statement even if the first is false ". But the following seems to be a different meaning of & altogether, can anyone explain how i & 1 works in the following example? List<int> scores = new List<int> { 1, 2, 3, 4, 5, 6, 7, 8 }; var evenScores = scores.Where(i => i % 2 == 0); var evenScores2 = scores.Where(i => (i & 1) == 0);
Tags (comma-separated)
Save Edits
Cancel