在方法体内使用数组
作者:互联网
方式一:
serviceBillList = serviceBillList.Where(b => new int[]{ 1,2,3}.Contains(b.Status));
方式二:
if (!new int[] { 1, 2, 3 }.Contains(item.Status)) { model.Status = "fail"; model.Message = "提交状态参数错误。"; return model; }
标签:Status,serviceBillList,int,Contains,数组,new,model,方法,体内 来源: https://www.cnblogs.com/firstcsharp/p/11230911.html