Skip to content

Commit 7803b3b

Browse files
BillWagnerCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <[email protected]>
1 parent e0775e0 commit 7803b3b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/csharp/linq/get-started/write-linq-queries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Write most queries with *query syntax* to create *query expressions*. The follow
4545

4646
:::code language="csharp" source="./snippets/SnippetApp/WriteLinqQueries.cs" id="write_linq_queries_1":::
4747

48-
The type of the queries is <xref:System.Collections.Generic.IEnumerable%601>. You can write all of these queries using [`var`](../../language-reference/statements/declarations.md#implicitly-typed-local-variables) as shown in the following example:
48+
The type of the queries is <xref:System.Collections.Generic.IEnumerable%601>. All of these queries can be written using [`var`](../../language-reference/statements/declarations.md#implicitly-typed-local-variables) as shown in the following example:
4949

5050
`var query = from num in numbers...`
5151

docs/csharp/linq/standard-query-operators/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ ai-usage: ai-assisted
66
---
77
# Standard query operators overview
88

9-
The *standard query operators* are the keywords and methods that form the LINQ pattern. The C# language defines [LINQ query keywords](../../language-reference/keywords/query-keywords.md) that you use for the most common query expression. The compiler translates expressions using these keywords to the equivalent method calls. The two forms are synonymous. Other methods that are part of the <xref:System.Linq?displayProperty=fullName> namespace don't have equivalent query keywords. In those cases, you must use the method syntax. This section covers all the query operator keywords. The runtime and other NuGet packages add more methods designed to work with LINQ queries each release. The most common methods, including those methods that have query keyword equivalents, are covered in this section. For the full list of query methods supported by the .NET Runtime, see the <xref:System.Linq.Enumerable?displayProperty=fullName> API documentation. In addition to the methods covered here, this class contains methods for concatenating data sources, computing a single value from a data source, such as a sum, average, or other value.
9+
The *standard query operators* are the keywords and methods that form the LINQ pattern. The C# language defines [LINQ query keywords](../../language-reference/keywords/query-keywords.md) that you use for the most common query expression. The compiler translates expressions using these keywords to the equivalent method calls. The two forms are synonymous. Other methods that are part of the <xref:System.Linq?displayProperty=fullName> namespace don't have equivalent query keywords. In those cases, you must use the method syntax. This section covers all the query operator keywords. The runtime and other NuGet packages add more methods designed to work with LINQ queries each release. The most common methods, including those that have query keyword equivalents, are covered in this section. For the full list of query methods supported by the .NET Runtime, see the <xref:System.Linq.Enumerable?displayProperty=fullName> API documentation. In addition to the methods covered here, this class contains methods for concatenating data sources, computing a single value from a data source, such as a sum, average, or other value.
1010

1111
[!INCLUDE [Prerequisites](../includes/linq-syntax.md)]
1212

13-
Most of these methods operate on sequences, where a sequence is an object whose type implements the <xref:System.Collections.Generic.IEnumerable%601> interface or the <xref:System.Linq.IQueryable%601> interface. The standard query operators provide query capabilities including filtering, projection, aggregation, sorting, and more. The methods that make up each set are extension members defined in the <xref:System.Linq.Enumerable> and <xref:System.Linq.Queryable> classes, respectively. They're defined as [*extension members*](../../programming-guide/classes-and-structs/extension-methods.md) where the receiver type is the `IEnumerable<T>` and `IQueryable<T>` type that they operate on.
13+
Most of these methods operate on sequences, where a sequence is an object whose type implements the <xref:System.Collections.Generic.IEnumerable%601> interface or the <xref:System.Linq.IQueryable%601> interface. The standard query operators provide query capabilities including filtering, projection, aggregation, sorting, and more. The methods that make up each set are extension members defined in the <xref:System.Linq.Enumerable> and <xref:System.Linq.Queryable> classes, respectively. They're defined as [*extension members*](../../programming-guide/classes-and-structs/extension-methods.md) where the receiver type is either the `IEnumerable<T>` or `IQueryable<T>` type that they operate on.
1414

1515
The distinction between <xref:System.Collections.Generic.IEnumerable%601> and <xref:System.Linq.IQueryable%601> sequences determines how the query is executed at runtime.
1616

@@ -32,7 +32,7 @@ You can find the data set in the [source repo](https://github.com/dotnet/docs/bl
3232

3333
## Types of query operators
3434

35-
The standard query operators differ in the timing of their execution, depending on whether they return a singleton value or a sequence of values. Those methods that return a singleton value (such as <xref:System.Linq.Enumerable.Average%2A> and <xref:System.Linq.Enumerable.Sum%2A>) execute immediately. Methods that return a sequence defer the query execution and return an enumerable object. You can use the output sequence of one query as the input sequence to another query. You can chain calls to query methods together in one query, which enables queries to become arbitrarily complex.
35+
The standard query operators differ in the timing of their execution, depending on whether they return a singleton value or a sequence of values. Those methods that return a singleton value (such as <xref:System.Linq.Enumerable.Average%2A> and <xref:System.Linq.Enumerable.Sum%2A>) execute immediately. Methods that return a sequence defer the query execution and return an enumerable object. You can use the output sequence of one query as the input sequence to another query. You chain query methods together in one query, which enables queries to become arbitrarily complex.
3636

3737
## Query operators
3838

0 commit comments

Comments
 (0)