if (ZFerDict.Exists(s => s.MAKTX == maktx))
mara = ZFerDict.FirstOrDefault(s => s.MAKTX == maktx);
if(ZFerDict.Exists(s => s.MATNR == maktx))
mara = ZFerDict.FirstOrDefault(s => s.MATNR == maktx);
return mara;
这段c#代码是什么意思,求解答
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
1条回答 默认 最新
楚楚3107 2022-04-01 16:52关注ZFerDict是一个List列表,判断是否包含maktx这个对象。
if (ZFerDict.Exists(s => s.MAKTX == maktx)) // 如果ZFerDict包含maktx成员。
mara = ZFerDict.FirstOrDefault(s => s.MAKTX == maktx); // 就将列表中的默认第一个maktx赋值给mara.
下边的也是这个意思。本回答被题主选为最佳回答 , 对您是否有帮助呢?评论 打赏 举报解决 1无用