我想知道根据https://learn.microsoft.com/en-us/dotnet/csharp/discards在 Linq 查询中使用 Discards 是否是好的模式,例如:
public bool HasRedProduct => Products.Any(_=>_.IsRed == true);
什么是优点/缺点而不是使用
public bool HasRedProduct => Products.Any(x=>x.IsRed == true);
慕码人8056858
泛舟湖上清波郎朗
斯蒂芬大帝
相关分类