Incorrect syntax for Aggregate
Linq function in example
#36451
Labels
doc-bug
Problem with the content; needs to be fixed [org][type][category]
dotnet-fundamentals/svc
okr-quality
Content-quality KR: Concerns article defects (bugs), freshness, or build warnings.
Pri1
High priority, do before Pri2 and Pri3
📌 seQUESTered
Identifies that an issue has been imported into Quest.
In the link mentioned in the Content. Go to section Essential LINQ.
In that the code example with the header The bread and butter - Where, Select, and Aggregate
The last section of example should include the type of 'strings'.
If it is as follows
string[] strings = {"abc", "xyzw"};
Then do the following change in example text.
Instead of having it like this
int sumOfStrings = strings.Aggregate(seed, (s1, s2) => s1.Length + s2.Length);
It should be as follows
int sumOfStrings = strings.Aggregate(seed, (s1, s2) => s1 + s2.Length);
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
Associated WorkItem - 143922
The text was updated successfully, but these errors were encountered: