Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
list.Min() は最小値を整数として取得します。特定のプロパティ X の最小値を持つ List 内のオブジェクトを取得したいのですが、どうすればよいですか?
MoreLINQを見てMinByください- または、Reactive Extensions には次のようなものがあると思います:System.Interactive
MinBy
System.Interactive
var cheapestProduct = products.MinBy(p => p.Price);
値が最も低いアイテムが複数ある場合は、シーケンス内の最も古いアイテムが返されます。