- var matching = from name in indexnames
- from surname in indexsurname
- from age in agesurname
- from height in indexheight
- where name.Equals(surname) &&
- name.Equals(age) && name.Equals(height)
- orderby name
- select name;
If statement in LINQ?
i have a couple of list but sometimes they are empty
How can i make sure it only does name.Equals(value) if it actualy contains anything ?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Ronika JencyRank #770 · 3K reputationPosted Jan 5, 2021, 11:09 PM EST