You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: xml/System.Linq/Enumerable.xml
+70-18Lines changed: 70 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -9094,11 +9094,24 @@ The following code example demonstrates how to use <xref:System.Linq.Enumerable.
9094
9094
<param name="keySelector">A function to extract the key for each element.</param>
9095
9095
<summary>Returns the maximum value in a generic sequence according to a specified key selector function.</summary>
9096
9096
<returns>The value with the maximum key in the sequence.</returns>
9097
-
<remarks>
9098
-
<para>If the source sequence is empty, two possible outcomes are possible depending on the source type. If <typeparamref name="TSource" /> is a nullable type, this method returns <see langword="null" />. If <typeparamref name="TSource" /> is a non-nullable struct, such as a primitive type, an <see cref="T:System.InvalidOperationException" /> is thrown.</para>
9099
-
<para>If the source sequence contains only values that are <see langword="null" />, this method returns <see langword="null" />.</para>
9100
-
</remarks>
9101
-
<exception cref="T:System.ArgumentNullException">
9097
+
<remarks>
9098
+
<para>
9099
+
If the source sequence is empty, two possible outcomes are possible depending on the source type. If <typeparamref name="TSource" /> is a nullable type, this method returns <see langword="null" />. If <typeparamref name="TSource" /> is a non-nullable struct, such as a primitive type, an <see cref="T:System.InvalidOperationException" /> is thrown.
9100
+
</para>
9101
+
<para>
9102
+
If the source sequence contains only values that are <see langword="null" />, this method returns <see langword="null" />.
9103
+
</para>
9104
+
<format type="text/markdown"><![CDATA[
9105
+
9106
+
## Examples
9107
+
9108
+
The following code example demonstrates how to use `MaxBy` to find the maximum value in a collection based on a specific property.
@@ -9169,11 +9182,24 @@ The following code example demonstrates how to use <xref:System.Linq.Enumerable.
9169
9182
<param name="comparer">The <see cref="T:System.Collections.Generic.IComparer`1" /> to compare keys.</param>
9170
9183
<summary>Returns the maximum value in a generic sequence according to a specified key selector function and key comparer.</summary>
9171
9184
<returns>The value with the maximum key in the sequence.</returns>
9172
-
<remarks>
9173
-
<para>If the source sequence is empty, two possible outcomes are possible depending on the source type. If <typeparamref name="TSource" /> is a nullable type, this method returns <see langword="null" />. If <typeparamref name="TSource" /> is a non-nullable struct, such as a primitive type, an <see cref="T:System.InvalidOperationException" /> is thrown.</para>
9174
-
<para>If the source sequence contains only values that are <see langword="null" />, this method returns <see langword="null" />.</para>
9175
-
</remarks>
9176
-
<exception cref="T:System.ArgumentNullException">
9185
+
<remarks>
9186
+
<para>
9187
+
If the source sequence is empty, two possible outcomes are possible depending on the source type. If <typeparamref name="TSource" /> is a nullable type, this method returns <see langword="null" />. If <typeparamref name="TSource" /> is a non-nullable struct, such as a primitive type, an <see cref="T:System.InvalidOperationException" /> is thrown.
9188
+
</para>
9189
+
<para>
9190
+
If the source sequence contains only values that are <see langword="null" />, this method returns <see langword="null" />.
9191
+
</para>
9192
+
<format type="text/markdown"><![CDATA[
9193
+
9194
+
## Examples
9195
+
9196
+
The following code example demonstrates how to use `MaxBy` with a custom comparer to ignore case sensitivity when checking for the maximum value.
@@ -10974,10 +11000,23 @@ The following code example demonstrates how to use <xref:System.Linq.Enumerable.
10974
11000
<param name="keySelector">A function to extract the key for each element.</param>
10975
11001
<summary>Returns the minimum value in a generic sequence according to a specified key selector function.</summary>
10976
11002
<returns>The value with the minimum key in the sequence.</returns>
10977
-
<remarks>
10978
-
<para>If the source sequence is empty, two possible outcomes are possible depending on the source type. If <typeparamref name="TSource" /> is a nullable type, this method returns <see langword="null" />. If <typeparamref name="TSource" /> is a non-nullable struct, such as a primitive type, an <see cref="T:System.InvalidOperationException" /> is thrown.</para>
10979
-
<para>If the source sequence contains only values that are <see langword="null" />, this method returns <see langword="null" />.</para>
10980
-
</remarks>
11003
+
<remarks>
11004
+
<para>
11005
+
If the source sequence is empty, two possible outcomes are possible depending on the source type. If <typeparamref name="TSource" /> is a nullable type, this method returns <see langword="null" />. If <typeparamref name="TSource" /> is a non-nullable struct, such as a primitive type, an <see cref="T:System.InvalidOperationException" /> is thrown.
11006
+
</para>
11007
+
<para>
11008
+
If the source sequence contains only values that are <see langword="null" />, this method returns <see langword="null" />.
11009
+
</para>
11010
+
<format type="text/markdown"><![CDATA[
11011
+
11012
+
## Examples
11013
+
11014
+
The following code example demonstrates how to use `MinBy` to find the minimum value in a collection based on a specific property.
<paramref name="source" /> is <see langword="null" />.</exception>
10983
11022
<exception cref="T:System.ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="T:System.IComparable" /> or <see cref="T:System.IComparable`1" /> interface.</exception>
@@ -11049,10 +11088,23 @@ The following code example demonstrates how to use <xref:System.Linq.Enumerable.
11049
11088
<param name="comparer">The <see cref="T:System.Collections.Generic.IComparer`1" /> to compare keys.</param>
11050
11089
<summary>Returns the minimum value in a generic sequence according to a specified key selector function and key comparer.</summary>
11051
11090
<returns>The value with the minimum key in the sequence.</returns>
11052
-
<remarks>
11053
-
<para>If the source sequence is empty, two possible outcomes are possible depending on the source type. If <typeparamref name="TSource" /> is a nullable type, this method returns <see langword="null" />. If <typeparamref name="TSource" /> is a non-nullable struct, such as a primitive type, an <see cref="T:System.InvalidOperationException" /> is thrown.</para>
11054
-
<para>If the source sequence contains only values that are <see langword="null" />, this method returns <see langword="null" />.</para>
11055
-
</remarks>
11091
+
<remarks>
11092
+
<para>
11093
+
If the source sequence is empty, two possible outcomes are possible depending on the source type. If <typeparamref name="TSource" /> is a nullable type, this method returns <see langword="null" />. If <typeparamref name="TSource" /> is a non-nullable struct, such as a primitive type, an <see cref="T:System.InvalidOperationException" /> is thrown.
11094
+
</para>
11095
+
<para>
11096
+
If the source sequence contains only values that are <see langword="null" />, this method returns <see langword="null" />.
11097
+
</para>
11098
+
<format type="text/markdown"><![CDATA[
11099
+
11100
+
## Examples
11101
+
11102
+
The following code example demonstrates how to use `MinBy` with a custom comparer to ignore case sensitivity when checking for the minimum value.
0 commit comments