-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
Pri3Indicates issues/PRs that are low priorityIndicates issues/PRs that are low priorityarea-System.LinquntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
Description
- the LINQ docs C# samples consist of 7 projects to showcase IEnumerable and IQueryable
unfortunately much code unnecessarily invokes AsQueryable() despite simpler IEnumerable method implementations existing
[thus such guidance is poor as such AsQueryable() overhead can be avoided] - should update to useful modern C# v12 semantics [Primary constructors, Collection expressions, Span, is, etc]
- calls being made to default parameterless ctor then assigning individual properties, rather than using parameterised ctors explicitly [or better yet primary constructor]
- current analyzers also disclose numerous Warnings/Messages, emphasising poor guidance for today's coding
- many cases of wastefully using Any(),Count(),LongCount etc when optimal coding available (e.g. Count, Length for Collections).
- spurious ToString() call in OrderByIComparer()
I will shortly submit a PR to explain problems & my suggestions.
Metadata
Metadata
Assignees
Labels
Pri3Indicates issues/PRs that are low priorityIndicates issues/PRs that are low priorityarea-System.LinquntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner