Skip to content

Commit f2a9919

Browse files
authored
add_try_dotnet (dotnet#5172)
1 parent 99a7c2d commit f2a9919

File tree

1 file changed

+29
-109
lines changed

1 file changed

+29
-109
lines changed

xml/System.Linq/Queryable.xml

Lines changed: 29 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -2736,9 +2736,9 @@
27362736
## Examples
27372737
The following code example demonstrates how to use <xref:System.Linq.Queryable.ElementAtOrDefault%60%601%28System.Linq.IQueryable%7B%60%600%7D%2CSystem.Int32%29>. This example uses a value for `index` that is outside the bounds of the source sequence.
27382738

2739-
[!code-csharp[System.Linq.Queryable#29](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs#29)]
2740-
[!code-vb[System.Linq.Queryable#29](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb#29)]
2741-
2739+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs" interactive="try-dotnet-method" id="Snippet29":::
2740+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb" id="Snippet29":::
2741+
27422742
]]></format>
27432743
</remarks>
27442744
<exception cref="T:System.ArgumentNullException">
@@ -4548,9 +4548,9 @@
45484548
## Examples
45494549
The following code example demonstrates how to use <xref:System.Linq.Queryable.LongCount%60%601%28System.Linq.IQueryable%7B%60%600%7D%29> to count the elements in an array.
45504550

4551-
[!code-csharp[System.Linq.Queryable#47](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs#47)]
4552-
[!code-vb[System.Linq.Queryable#47](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb#47)]
4553-
4551+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs" interactive="try-dotnet-method" id="Snippet47":::
4552+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb" id="Snippet47":::
4553+
45544554
]]></format>
45554555
</remarks>
45564556
<exception cref="T:System.ArgumentNullException">
@@ -4617,7 +4617,7 @@
46174617

46184618
[!code-csharp[System.Linq.Queryable#48](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs#48)]
46194619
[!code-vb[System.Linq.Queryable#48](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb#48)]
4620-
4620+
46214621
]]></format>
46224622
</remarks>
46234623
<exception cref="T:System.ArgumentNullException">
@@ -5328,9 +5328,9 @@
53285328
## Examples
53295329
The following code example demonstrates how to use <xref:System.Linq.Queryable.Reverse%60%601%28System.Linq.IQueryable%7B%60%600%7D%29> to reverse the order of elements in an array.
53305330

5331-
[!code-csharp[System.Linq.Queryable#74](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs#74)]
5332-
[!code-vb[System.Linq.Queryable#74](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb#74)]
5333-
5331+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs" interactive="try-dotnet-method" id="Snippet74":::
5332+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb" id="Snippet74":::
5333+
53345334
]]></format>
53355335
</remarks>
53365336
<exception cref="T:System.ArgumentNullException">
@@ -6385,9 +6385,9 @@ If `count` is not a positive number, this method returns an identical copy of th
63856385
## Examples
63866386
The following code example demonstrates how to use <xref:System.Linq.Queryable.SkipWhile%60%601%28System.Linq.IQueryable%7B%60%600%7D%2CSystem.Linq.Expressions.Expression%7BSystem.Func%7B%60%600%2CSystem.Boolean%7D%7D%29> to skip elements of an array as long as a condition is true.
63876387

6388-
[!code-csharp[System.Linq.Queryable#88](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs#88)]
6389-
[!code-vb[System.Linq.Queryable#88](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb#88)]
6390-
6388+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs" interactive="try-dotnet-method" id="Snippet88":::
6389+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb" id="Snippet88":::
6390+
63916391
]]></format>
63926392
</remarks>
63936393
<exception cref="T:System.ArgumentNullException">
@@ -6451,9 +6451,9 @@ If `count` is not a positive number, this method returns an identical copy of th
64516451
## Examples
64526452
The following code example demonstrates how to use <xref:System.Linq.Queryable.SkipWhile%60%601%28System.Linq.IQueryable%7B%60%600%7D%2CSystem.Linq.Expressions.Expression%7BSystem.Func%7B%60%600%2CSystem.Int32%2CSystem.Boolean%7D%7D%29> to skip elements of an array as long as a condition that depends on the element's index is true.
64536453

6454-
[!code-csharp[System.Linq.Queryable#89](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs#89)]
6455-
[!code-vb[System.Linq.Queryable#89](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb#89)]
6456-
6454+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs" interactive="try-dotnet-method" id="Snippet89":::
6455+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb" id="Snippet89":::
6456+
64576457
]]></format>
64586458
</remarks>
64596459
<exception cref="T:System.ArgumentNullException">
@@ -6514,16 +6514,6 @@ If `count` is not a positive number, this method returns an identical copy of th
65146514

65156515
The query behavior that occurs as a result of executing an expression tree that represents calling <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Decimal%7D%29> depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`.
65166516

6517-
6518-
6519-
## Examples
6520-
The following code example demonstrates how to use <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Single%7D%29> to sum the values of a sequence.
6521-
6522-
[!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)]
6523-
6524-
[!code-csharp[System.Linq.Queryable#120](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs#120)]
6525-
[!code-vb[System.Linq.Queryable#120](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb#120)]
6526-
65276517
]]></format>
65286518
</remarks>
65296519
<exception cref="T:System.ArgumentNullException">
@@ -6575,16 +6565,6 @@ If `count` is not a positive number, this method returns an identical copy of th
65756565

65766566
The query behavior that occurs as a result of executing an expression tree that represents calling <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Double%7D%29> depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`.
65776567

6578-
6579-
6580-
## Examples
6581-
The following code example demonstrates how to use <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Single%7D%29> to sum the values of a sequence.
6582-
6583-
[!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)]
6584-
6585-
[!code-csharp[System.Linq.Queryable#120](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs#120)]
6586-
[!code-vb[System.Linq.Queryable#120](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb#120)]
6587-
65886568
]]></format>
65896569
</remarks>
65906570
<exception cref="T:System.ArgumentNullException">
@@ -6635,16 +6615,6 @@ If `count` is not a positive number, this method returns an identical copy of th
66356615

66366616
The query behavior that occurs as a result of executing an expression tree that represents calling <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Int32%7D%29> depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`.
66376617

6638-
6639-
6640-
## Examples
6641-
The following code example demonstrates how to use <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Single%7D%29> to sum the values of a sequence.
6642-
6643-
[!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)]
6644-
6645-
[!code-csharp[System.Linq.Queryable#120](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs#120)]
6646-
[!code-vb[System.Linq.Queryable#120](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb#120)]
6647-
66486618
]]></format>
66496619
</remarks>
66506620
<exception cref="T:System.ArgumentNullException">
@@ -6695,17 +6665,7 @@ If `count` is not a positive number, this method returns an identical copy of th
66956665
The <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Int64%7D%29> method generates a <xref:System.Linq.Expressions.MethodCallExpression> that represents calling <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Int64%7D%29> itself as a constructed generic method. It then passes the <xref:System.Linq.Expressions.MethodCallExpression> to the <xref:System.Linq.IQueryProvider.Execute%60%601%28System.Linq.Expressions.Expression%29> method of the <xref:System.Linq.IQueryProvider> represented by the <xref:System.Linq.IQueryable.Provider%2A> property of the `source` parameter.
66966666

66976667
The query behavior that occurs as a result of executing an expression tree that represents calling <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Int64%7D%29> depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`.
6698-
6699-
6700-
6701-
## Examples
6702-
The following code example demonstrates how to use <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Single%7D%29> to sum the values of a sequence.
6703-
6704-
[!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)]
6705-
6706-
[!code-csharp[System.Linq.Queryable#120](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs#120)]
6707-
[!code-vb[System.Linq.Queryable#120](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb#120)]
6708-
6668+
67096669
]]></format>
67106670
</remarks>
67116671
<exception cref="T:System.ArgumentNullException">
@@ -6756,17 +6716,7 @@ If `count` is not a positive number, this method returns an identical copy of th
67566716
The <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Nullable%7BSystem.Decimal%7D%7D%29> method generates a <xref:System.Linq.Expressions.MethodCallExpression> that represents calling <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Nullable%7BSystem.Decimal%7D%7D%29> itself as a constructed generic method. It then passes the <xref:System.Linq.Expressions.MethodCallExpression> to the <xref:System.Linq.IQueryProvider.Execute%60%601%28System.Linq.Expressions.Expression%29> method of the <xref:System.Linq.IQueryProvider> represented by the <xref:System.Linq.IQueryable.Provider%2A> property of the `source` parameter.
67576717

67586718
The query behavior that occurs as a result of executing an expression tree that represents calling <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Nullable%7BSystem.Decimal%7D%7D%29> depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`.
6759-
6760-
6761-
6762-
## Examples
6763-
The following code example demonstrates how to use <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Nullable%7BSystem.Single%7D%7D%29> to sum the values of a sequence.
6764-
6765-
[!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)]
6766-
6767-
[!code-csharp[System.Linq.Queryable#121](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs#121)]
6768-
[!code-vb[System.Linq.Queryable#121](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb#121)]
6769-
6719+
67706720
]]></format>
67716721
</remarks>
67726722
<exception cref="T:System.ArgumentNullException">
@@ -6817,17 +6767,7 @@ If `count` is not a positive number, this method returns an identical copy of th
68176767
The <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Nullable%7BSystem.Double%7D%7D%29> method generates a <xref:System.Linq.Expressions.MethodCallExpression> that represents calling <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Nullable%7BSystem.Double%7D%7D%29> itself as a constructed generic method. It then passes the <xref:System.Linq.Expressions.MethodCallExpression> to the <xref:System.Linq.IQueryProvider.Execute%60%601%28System.Linq.Expressions.Expression%29> method of the <xref:System.Linq.IQueryProvider> represented by the <xref:System.Linq.IQueryable.Provider%2A> property of the `source` parameter.
68186768

68196769
The query behavior that occurs as a result of executing an expression tree that represents calling <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Nullable%7BSystem.Double%7D%7D%29> depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`.
6820-
6821-
6822-
6823-
## Examples
6824-
The following code example demonstrates how to use <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Nullable%7BSystem.Single%7D%7D%29> to sum the values of a sequence.
6825-
6826-
[!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)]
6827-
6828-
[!code-csharp[System.Linq.Queryable#121](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs#121)]
6829-
[!code-vb[System.Linq.Queryable#121](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb#121)]
6830-
6770+
68316771
]]></format>
68326772
</remarks>
68336773
<exception cref="T:System.ArgumentNullException">
@@ -6878,16 +6818,6 @@ If `count` is not a positive number, this method returns an identical copy of th
68786818

68796819
The query behavior that occurs as a result of executing an expression tree that represents calling <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Nullable%7BSystem.Int32%7D%7D%29> depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`.
68806820

6881-
6882-
6883-
## Examples
6884-
The following code example demonstrates how to use <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Nullable%7BSystem.Single%7D%7D%29> to sum the values of a sequence.
6885-
6886-
[!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)]
6887-
6888-
[!code-csharp[System.Linq.Queryable#121](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs#121)]
6889-
[!code-vb[System.Linq.Queryable#121](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb#121)]
6890-
68916821
]]></format>
68926822
</remarks>
68936823
<exception cref="T:System.ArgumentNullException">
@@ -6938,17 +6868,7 @@ If `count` is not a positive number, this method returns an identical copy of th
69386868
The <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Nullable%7BSystem.Int64%7D%7D%29> method generates a <xref:System.Linq.Expressions.MethodCallExpression> that represents calling <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Nullable%7BSystem.Int64%7D%7D%29> itself as a constructed generic method. It then passes the <xref:System.Linq.Expressions.MethodCallExpression> to the <xref:System.Linq.IQueryProvider.Execute%60%601%28System.Linq.Expressions.Expression%29> method of the <xref:System.Linq.IQueryProvider> represented by the <xref:System.Linq.IQueryable.Provider%2A> property of the `source` parameter.
69396869

69406870
The query behavior that occurs as a result of executing an expression tree that represents calling <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Nullable%7BSystem.Int64%7D%7D%29> depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`.
6941-
6942-
6943-
6944-
## Examples
6945-
The following code example demonstrates how to use <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Nullable%7BSystem.Single%7D%7D%29> to sum the values of a sequence.
6946-
6947-
[!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)]
6948-
6949-
[!code-csharp[System.Linq.Queryable#121](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs#121)]
6950-
[!code-vb[System.Linq.Queryable#121](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb#121)]
6951-
6871+
69526872
]]></format>
69536873
</remarks>
69546874
<exception cref="T:System.ArgumentNullException">
@@ -7005,9 +6925,9 @@ If `count` is not a positive number, this method returns an identical copy of th
70056925
## Examples
70066926
The following code example demonstrates how to use <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Nullable%7BSystem.Single%7D%7D%29> to sum the values of a sequence.
70076927

7008-
[!code-csharp[System.Linq.Queryable#121](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs#121)]
7009-
[!code-vb[System.Linq.Queryable#121](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb#121)]
7010-
6928+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs" interactive="try-dotnet-method" id="Snippet121":::
6929+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb" id="Snippet121":::
6930+
70116931
]]></format>
70126932
</remarks>
70136933
<exception cref="T:System.ArgumentNullException">
@@ -7063,9 +6983,9 @@ If `count` is not a positive number, this method returns an identical copy of th
70636983
## Examples
70646984
The following code example demonstrates how to use <xref:System.Linq.Queryable.Sum%28System.Linq.IQueryable%7BSystem.Single%7D%29> to sum the values of a sequence.
70656985

7066-
[!code-csharp[System.Linq.Queryable#120](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs#120)]
7067-
[!code-vb[System.Linq.Queryable#120](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb#120)]
7068-
6986+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs" interactive="try-dotnet-method" id="Snippet120":::
6987+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb" id="Snippet120":::
6988+
70696989
]]></format>
70706990
</remarks>
70716991
<exception cref="T:System.ArgumentNullException">
@@ -8679,9 +8599,9 @@ If `count` is not a positive number, this method returns an empty queryable sequ
86798599
## Examples
86808600
The following code example demonstrates how to use the <xref:System.Linq.Queryable.Zip%2A> method to merge two sequences.
86818601

8682-
[!code-csharp[System.Linq.Queryable#200](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs#200)]
8683-
[!code-vb[System.Linq.Queryable#200](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb#200)]
8684-
8602+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Queryable/CS/queryable.cs" interactive="try-dotnet-method" id="Snippet200":::
8603+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Queryable/VB/queryable.vb" id="Snippet200":::
8604+
86858605
]]></format>
86868606
</remarks>
86878607
<exception cref="T:System.ArgumentNullException">

0 commit comments

Comments
 (0)