From 184523f20ad2a9f66d3b9b4a19244fbd40bdcc76 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 26 Mar 2019 02:30:50 -0400 Subject: [PATCH 01/10] typo: usinglambda -> using lambda --- xml/System/Array.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System/Array.xml b/xml/System/Array.xml index 98f840e3c08..6b9d64d285a 100644 --- a/xml/System/Array.xml +++ b/xml/System/Array.xml @@ -2660,7 +2660,7 @@ ## Examples - The following example specifies the match conditions for the method usinglambda expressions to check whether a planet starts with a given letter or whether the planet is found on the given array. + The following example specifies the match conditions for the method using lambda expressions to check whether a planet starts with a given letter or whether the planet is found on the given array. [!code-csharp[System.Array.Exists#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.array.exists/cs/exists3.cs#3)] [!code-vb[System.Array.Exists#3](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.array.exists/vb/exists3.vb#3)] From 4ff1e3d281014f742152a9c84b00e4662803aae5 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 26 Mar 2019 02:31:06 -0400 Subject: [PATCH 02/10] typo: arrayfor -> array for --- xml/System/Array.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System/Array.xml b/xml/System/Array.xml index 6b9d64d285a..9ab885f14a3 100644 --- a/xml/System/Array.xml +++ b/xml/System/Array.xml @@ -4680,7 +4680,7 @@ method, that override is called. + This method searches all the elements of a one-dimensional array for `value`. To determine whether `value` exists in `array`, the method performs an equality comparison by calling each element's `Equals` method until it finds a match. This means that if the element overrides the method, that override is called. Because most arrays have a lower bound of zero, this method generally returns -1 if`value` isn't found. In the rare case that the lower bound of the array is equal to (0x80000000) and `value` isn't found, this method returns (0x7FFFFFFF). From 39e5b4e5ab0456ecce58fc4078dc71fb106df5a4 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 26 Mar 2019 02:31:25 -0400 Subject: [PATCH 03/10] typo: arrayfrom -> array from --- xml/System/Array.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System/Array.xml b/xml/System/Array.xml index 9ab885f14a3..317c3a6c3d8 100644 --- a/xml/System/Array.xml +++ b/xml/System/Array.xml @@ -4850,7 +4850,7 @@ method, that override is called. + This method searches the elements of a one-dimensional array from `startIndex` to `startIndex` plus `count` minus 1, if `count` is greater than 0. To determine whether `value` exists in `array`, the method performs an equality comparison by calling the `Equals` method of every element until it finds a match. This means that if the element overrides the method, that override is called. Becausemost arrays have a lower bound of zero, this method generally returns -1 when `value` isn't found. In the rare case that the lower bound of the array is equal to (0x80000000) and `value` isn't found, this method returns (0x7FFFFFFF). From 1c9258f42dd5f144d7ff23f3e60636cd616b1ce5 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 26 Mar 2019 02:31:47 -0400 Subject: [PATCH 04/10] typo: Becausemost -> Because most --- xml/System/Array.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System/Array.xml b/xml/System/Array.xml index 317c3a6c3d8..68ebd245f61 100644 --- a/xml/System/Array.xml +++ b/xml/System/Array.xml @@ -4852,7 +4852,7 @@ ## Remarks This method searches the elements of a one-dimensional array from `startIndex` to `startIndex` plus `count` minus 1, if `count` is greater than 0. To determine whether `value` exists in `array`, the method performs an equality comparison by calling the `Equals` method of every element until it finds a match. This means that if the element overrides the method, that override is called. - Becausemost arrays have a lower bound of zero, this method generally returns -1 when `value` isn't found. In the rare case that the lower bound of the array is equal to (0x80000000) and `value` isn't found, this method returns (0x7FFFFFFF). + Because most arrays have a lower bound of zero, this method generally returns -1 when `value` isn't found. In the rare case that the lower bound of the array is equal to (0x80000000) and `value` isn't found, this method returns (0x7FFFFFFF). If `startindex` equals , the method returns -1. If `startIndex` is greater than , the method throws an . From 4092d0d818d58099a52e17d7d0635fcbd2362a0b Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 26 Mar 2019 02:32:07 -0400 Subject: [PATCH 05/10] typo: searchesthe -> searches the --- xml/System/Array.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System/Array.xml b/xml/System/Array.xml index 68ebd245f61..ed25d1d9f2d 100644 --- a/xml/System/Array.xml +++ b/xml/System/Array.xml @@ -5086,7 +5086,7 @@ method, that override is called. + This method searches the elements of a one-dimensional array from `startIndex` to `startIndex` plus `count` minus 1, if `count` is greater than 0. To determine whether `value` exists in `array`, the method performs an equality comparison by calling the `T.Equals` method on every element. This means that if `T` overrides the method, that override is called. If `startIndex` equals , the method returns -1. If `startIndex` is greater than , the method throws an . From 12a07f3dd264c85f543cf9daad7eca04b94cb732 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 26 Mar 2019 02:32:37 -0400 Subject: [PATCH 06/10] typo: arrayby -> array by --- xml/System/Array.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System/Array.xml b/xml/System/Array.xml index ed25d1d9f2d..0c7f94a4b35 100644 --- a/xml/System/Array.xml +++ b/xml/System/Array.xml @@ -7268,7 +7268,7 @@ int[,,] TDArray = new int[1,1,1]; ## Examples - The following example sorts the values in a string arrayby using the default comparer. It also defines a custom implementation named `ReverseComparer` that reverses an object's default sort order while performing a case-insensitive string comparison. Note that the output might vary depending on the current culture. + The following example sorts the values in a string array by using the default comparer. It also defines a custom implementation named `ReverseComparer` that reverses an object's default sort order while performing a case-insensitive string comparison. Note that the output might vary depending on the current culture. [!code-cpp[System.Array.Sort#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Array.Sort/CPP/arraysort.cpp#1)] [!code-csharp[System.Array.Sort#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Array.Sort/CS/arraysort.cs#1)] From 70cdc43087e42785910348b94db7092890d71131 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 26 Mar 2019 02:33:00 -0400 Subject: [PATCH 07/10] typo: previouslythrew -> previously threw --- xml/System/Array.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System/Array.xml b/xml/System/Array.xml index 0c7f94a4b35..84f66e20fb5 100644 --- a/xml/System/Array.xml +++ b/xml/System/Array.xml @@ -7406,7 +7406,7 @@ int[,,] TDArray = new int[1,1,1]; is , and one or more elements in the do not implement the interface. - The .NET Framework 4 and earlier versions used only the Quicksort algorithm. Quicksort identifies invalid comparers in some situations in which the sorting operation throws an exception, and throws an exception to the caller. Starting with the [!INCLUDE[net_v45](~/includes/net-v45-md.md)], it is possible that sorting operations that previouslythrew will not throw an exception, becausethe insertion sort and heapsort algorithms do not detect an invalid comparer. For the most part, this applies to arrays with fewer than 16 elements. + The .NET Framework 4 and earlier versions used only the Quicksort algorithm. Quicksort identifies invalid comparers in some situations in which the sorting operation throws an exception, and throws an exception to the caller. Starting with the [!INCLUDE[net_v45](~/includes/net-v45-md.md)], it is possible that sorting operations that previously threw will not throw an exception, becausethe insertion sort and heapsort algorithms do not detect an invalid comparer. For the most part, this applies to arrays with fewer than 16 elements. From c55a8f4dab6d93bb441bd3b7ee1da63a0c7be276 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 26 Mar 2019 02:33:17 -0400 Subject: [PATCH 08/10] typo: becausethe -> because the --- xml/System/Array.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System/Array.xml b/xml/System/Array.xml index 84f66e20fb5..6337eb51074 100644 --- a/xml/System/Array.xml +++ b/xml/System/Array.xml @@ -7406,7 +7406,7 @@ int[,,] TDArray = new int[1,1,1]; is , and one or more elements in the do not implement the interface. - The .NET Framework 4 and earlier versions used only the Quicksort algorithm. Quicksort identifies invalid comparers in some situations in which the sorting operation throws an exception, and throws an exception to the caller. Starting with the [!INCLUDE[net_v45](~/includes/net-v45-md.md)], it is possible that sorting operations that previously threw will not throw an exception, becausethe insertion sort and heapsort algorithms do not detect an invalid comparer. For the most part, this applies to arrays with fewer than 16 elements. + The .NET Framework 4 and earlier versions used only the Quicksort algorithm. Quicksort identifies invalid comparers in some situations in which the sorting operation throws an exception, and throws an exception to the caller. Starting with the [!INCLUDE[net_v45](~/includes/net-v45-md.md)], it is possible that sorting operations that previously threw will not throw an exception, because the insertion sort and heapsort algorithms do not detect an invalid comparer. For the most part, this applies to arrays with fewer than 16 elements. From 785ed6bcb9e6d9ea76a8edc07cfa1aa5524947b3 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 26 Mar 2019 02:33:46 -0400 Subject: [PATCH 09/10] typo: comparandsare -> comparands are --- xml/System/Array.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System/Array.xml b/xml/System/Array.xml index 6337eb51074..48379494067 100644 --- a/xml/System/Array.xml +++ b/xml/System/Array.xml @@ -8146,7 +8146,7 @@ int[,,] TDArray = new int[1,1,1]; ## Examples The following code example demonstrates the method overload. - The code example defines an alternative comparison method for strings, named `CompareDinosByLength`. This method works as follows: First, the comparandsare tested for`null`, and a null reference is treated as less than a non-null. Second, the string lengths are compared, and the longer string is deemed to be greater. Third, if the lengths are equal, ordinary string comparison is used. + The code example defines an alternative comparison method for strings, named `CompareDinosByLength`. This method works as follows: First, the comparands are tested for`null`, and a null reference is treated as less than a non-null. Second, the string lengths are compared, and the longer string is deemed to be greater. Third, if the lengths are equal, ordinary string comparison is used. A array of strings is created and populated with four strings, in no particular order. The list also includes an empty string and a null reference. The list is displayed, sorted using a generic delegate representing the `CompareDinosByLength` method, and displayed again. From a07aadd2d63ff38d658e002182af10e670f272ae Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 26 Mar 2019 02:34:15 -0400 Subject: [PATCH 10/10] typo: arrayincludes -> array includes --- xml/System/Array.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System/Array.xml b/xml/System/Array.xml index 48379494067..606545f03ee 100644 --- a/xml/System/Array.xml +++ b/xml/System/Array.xml @@ -9792,7 +9792,7 @@ int[,,] TDArray = new int[1,1,1]; ## Examples - The following example determines whether the last character of each element in a string array is a number. It creates two string arrays. The first arrayincludes both strings that end with alphabetic characters and strings that end with numeric characters.The second array consists only of strings that end with numeric characters. The example also defines an `EndWithANumber` method whose signature matches the delegate. The example passes each array to the method along with a delegate that represents the `EndsWithANumber` method. + The following example determines whether the last character of each element in a string array is a number. It creates two string arrays. The first array includes both strings that end with alphabetic characters and strings that end with numeric characters.The second array consists only of strings that end with numeric characters. The example also defines an `EndWithANumber` method whose signature matches the delegate. The example passes each array to the method along with a delegate that represents the `EndsWithANumber` method. [!code-csharp[System.Array.TrueForAll#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.array.trueforall/cs/trueforall2.cs#2)] [!code-vb[System.Array.TrueForAll#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.array.trueforall/vb/trueforall2.vb#2)]