devs. Got next fast question.
It’s about good practice.
ListA.Where(x => (x.Name == "James Bond") || (x.Number == "007" || x.Number == "7"));
Im looking for James Bond or Agent with number 007 or 7.
//Some fun
Well, in this example Im looking only for 2 numbers.
Is there any way in lambda expresion similar to IN operator in SQL?
i.e
string[] nums = {"007","7"};
ListA.Where(x => (x.Name == "James Bond") || (x.Number.Contains(nums));
1 Answer