The || (or) Operator in Linq with C#

后端 未结 6 1895
独厮守ぢ
独厮守ぢ 2020-12-06 02:13

I\'m using linq to filter a selection of MessageItems. The method I\'ve written accepts a bunch of parameters that might be null. If they are null, the criteria for the file

6条回答
  •  执笔经年
    2020-12-06 02:36

    Like Brian said, I would look if the msg.FromName is null before doing the ToLower().Contains(fromname.ToLower()))

提交回复
热议问题