dotnet / dotnet/dotnet-api-docs
Queryable.Min misleading comment
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
The comment in the code example is misleading:
```
// Get the Pet object that has the smallest Age value.
int min = pets.AsQueryable().Min(pet => pet.Age);
```
The following line does not get the `Pet` object, instead, it gets the `Age` of the `Pet` object that has the minimum `Age`.
Note: I was looking for a method that would return the Pet object corresponding to the minimum projected value.
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: 85e2552e-beea-e14a-d379-5662ea934012
* Version Independent ID: 846fa5ca-1271-e1a9-2f48-4d85c76e35b2
* Content: [Queryable.Min Method (System.Linq)](https://docs.microsoft.com/en-us/dotnet/api/system.linq.queryable.min?view=netframework-4.7.2)
* Content Source: [xml/System.Linq/Queryable.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Linq/Queryable.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**
Contributor guide
Assessment
This issue has not been assessed yet.