Skip to content

Commit a7a97c0

Browse files
authored
Fix language descriptor (dotnet#40256)
* Fix language descriptor Fixes dotnet#40255 * Update set-operations.md
1 parent 6175b87 commit a7a97c0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/csharp/linq/standard-query-operators/set-operations.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The following example depicts the behavior of the <xref:System.Linq.Enumerable.D
2020

2121
:::image type="content" source="./media/set-operations/distinct-method-behavior.png" alt-text="Graphic showing the behavior of Distinct()":::
2222

23-
:::code language="csharp;" source="snippets/standard-query-operators/SetOperations.cs" id="Distinct":::
23+
:::code language="csharp" source="snippets/standard-query-operators/SetOperations.cs" id="Distinct":::
2424

2525
The [`DistinctBy`](xref:System.Linq.Enumerable.DistinctBy%2A?displayProperty=nameWithType) is an alternative approach to `Distinct` that takes a `keySelector`. The `keySelector` is used as the comparative discriminator of the source type. In the following code, words are discriminated based on their `Length`, and the first word of each length is displayed:
2626

@@ -42,7 +42,7 @@ Each `Student` has a grade level, a primary department, and a series of scores.
4242

4343
The <xref:System.Linq.Enumerable.ExceptBy%2A> method is an alternative approach to `Except` that takes two sequences of possibly heterogenous types and a `keySelector`. The `keySelector` is the same type as the first collection's type. Consider the following `Teacher` array and teacher IDs to exclude. To find teachers in the first collection that aren't in the second collection, you can project the teacher's ID onto the second collection:
4444

45-
:::code source="snippets/standard-query-operators/SetOperations.cs" id="ExceptBy":::
45+
:::code language="csharp" source="snippets/standard-query-operators/SetOperations.cs" id="ExceptBy":::
4646

4747
In the preceding C# code:
4848

@@ -58,11 +58,11 @@ The following example depicts the behavior of <xref:System.Linq.Enumerable.Inter
5858

5959
:::image type="content" source="./media/set-operations/intersection-two-sequences.png" alt-text="Graphic showing the intersection of two sequences":::
6060

61-
:::code language="csharp;" source="./snippets/standard-query-operators/SetOperations.cs" id="Intersect":::
61+
:::code language="csharp" source="./snippets/standard-query-operators/SetOperations.cs" id="Intersect":::
6262

6363
The <xref:System.Linq.Enumerable.IntersectBy%2A> method is an alternative approach to `Intersect` that takes two sequences of possibly heterogenous types and a `keySelector`. The `keySelector` is used as the comparative discriminator of the second collection's type. Consider the following student and teacher arrays. The query matches items in each sequence by name to find those students who aren't also teachers:
6464

65-
:::code source="./snippets/standard-query-operators/SetOperations.cs" id="IntersectBy":::
65+
:::code language="csharp" source="./snippets/standard-query-operators/SetOperations.cs" id="IntersectBy":::
6666

6767
In the preceding C# code:
6868

@@ -76,11 +76,11 @@ The following example depicts a union operation on two sequences of strings. The
7676

7777
:::image type="content" source="./media/set-operations/union-operation-two-sequences.png" alt-text="Graphic showing the union of two sequences.":::
7878

79-
:::code language="csharp;" source="./snippets/standard-query-operators/SetOperations.cs" id="Union":::
79+
:::code language="csharp" source="./snippets/standard-query-operators/SetOperations.cs" id="Union":::
8080

8181
The <xref:System.Linq.Enumerable.UnionBy%2A> method is an alternative approach to `Union` that takes two sequences of the same type and a `keySelector`. The `keySelector` is used as the comparative discriminator of the source type. The following query produces the list of all people that are either students or teachers. Students who are also teachers are added to the union set only once:
8282

83-
:::code source="./snippets/standard-query-operators/SetOperations.cs" id="UnionBy":::
83+
:::code language="csharp" source="./snippets/standard-query-operators/SetOperations.cs" id="UnionBy":::
8484

8585
In the preceding C# code:
8686

0 commit comments

Comments
 (0)