diff --git a/docs/csharp/how-to/parse-strings-using-split.md b/docs/csharp/how-to/parse-strings-using-split.md index 72c31840f87d6..431967e4344e1 100644 --- a/docs/csharp/how-to/parse-strings-using-split.md +++ b/docs/csharp/how-to/parse-strings-using-split.md @@ -38,6 +38,8 @@ The has many overloads. The remaining examples use different overloads to show each of these behaviors. +For more information about indices, see the [Explore indexes and ranges](../tutorials/ranges-indexes.md) article. + ## Specify multiple separators can use multiple separator characters. The following example uses spaces, commas, periods, colons, and tabs as separating characters, which are passed to in an array. The loop at the bottom of the code displays each of the words in the returned array. diff --git a/docs/csharp/language-reference/builtin-types/arrays.md b/docs/csharp/language-reference/builtin-types/arrays.md index 5528172db6afd..cf2b8ad47917e 100644 --- a/docs/csharp/language-reference/builtin-types/arrays.md +++ b/docs/csharp/language-reference/builtin-types/arrays.md @@ -77,6 +77,8 @@ A *single-dimensional array* is a sequence of like elements. You access an eleme The first declaration declares an uninitialized array of five integers, from `array[0]` to `array[4]`. The elements of the array are initialized to the [default value](default-values.md) of the element type, `0` for integers. The second declaration declares an array of strings and initializes all seven values of that array. A series of `Console.WriteLine` statements prints all the elements of the `weekDay` array. For single-dimensional arrays, the `foreach` statement processes elements in increasing index order, starting with index 0 and ending with index `Length - 1`. +For more information about indices, see the [Explore indexes and ranges](../../tutorials/ranges-indexes.md) article. + ### Pass single-dimensional arrays as arguments You can pass an initialized single-dimensional array to a method. In the following example, an array of strings is initialized and passed as an argument to a `DisplayArray` method for strings. The method displays the elements of the array. Next, the `ChangeArray` method reverses the array elements, and then the `ChangeArrayElements` method modifies the first three elements of the array. After each method returns, the `DisplayArray` method shows that passing an array by value doesn't prevent changes to the array elements. diff --git a/docs/csharp/language-reference/builtin-types/collections.md b/docs/csharp/language-reference/builtin-types/collections.md index b191306fa76f4..09180720ae441 100644 --- a/docs/csharp/language-reference/builtin-types/collections.md +++ b/docs/csharp/language-reference/builtin-types/collections.md @@ -42,6 +42,8 @@ For the type of elements in the , you :::code language="csharp" source="./snippets/shared/Collections.cs" id="SnippetCustomList"::: +For more information about indices, see the [Explore indexes and ranges](../../tutorials/ranges-indexes.md) article. + ## Key/value pair collections These examples use the class. It's the most common dictionary collection. A dictionary collection enables you to access elements in the collection by using the key of each element. Each addition to the dictionary consists of a value and its associated key. diff --git a/docs/csharp/programming-guide/strings/index.md b/docs/csharp/programming-guide/strings/index.md index 26bd10874d165..c19bb5d57519a 100644 --- a/docs/csharp/programming-guide/strings/index.md +++ b/docs/csharp/programming-guide/strings/index.md @@ -150,6 +150,8 @@ If the methods don't provide the functionality that you mus :::code language="csharp" source="./snippets/StringCharacters.cs" id="AccessChars"::: +For more information about indices, see the [Explore indexes and ranges](../../tutorials/ranges-indexes.md) article. + ## Null strings and empty strings An empty string is an instance of a object that contains zero characters. Empty strings are used often in various programming scenarios to represent a blank text field. You can call methods on empty strings because they're valid objects. Empty strings are initialized as follows: diff --git a/docs/csharp/tour-of-csharp/overview.md b/docs/csharp/tour-of-csharp/overview.md index 582c430ef2d1f..d72962c4763d7 100644 --- a/docs/csharp/tour-of-csharp/overview.md +++ b/docs/csharp/tour-of-csharp/overview.md @@ -88,6 +88,8 @@ You can use *index* and *range* expressions to retrieve one or more elements fro The `^` index indicates *from the end* rather than from the start. The `^0` element is one past the end of the collection, so `^1` is the last element. The `..` in a range expression denotes the range of elements to include. The range starts with the first index and includes all elements up to, but not including, the element at the last index. +For more information about index and range expressions, see the [Explore indexes and ranges](../tutorials/ranges-indexes.md) article. + [Language integrated query (LINQ)](../linq/index.md) provides a common pattern-based syntax to query or transform any collection of data. LINQ unifies the syntax for querying in-memory collections, structured data like XML or JSON, database storage, and even cloud based data APIs. You learn one set of syntax and you can search and manipulate data regardless of its storage. The following query finds all students whose grade point average is greater than 3.5: :::code language="csharp" source="./snippets/shared/LinqExample.cs" id="LinqExampleQuery"::: diff --git a/docs/csharp/tour-of-csharp/tutorials/list-collection.md b/docs/csharp/tour-of-csharp/tutorials/list-collection.md index 6a0c3231398ed..74a6388cccb25 100644 --- a/docs/csharp/tour-of-csharp/tutorials/list-collection.md +++ b/docs/csharp/tour-of-csharp/tutorials/list-collection.md @@ -45,6 +45,8 @@ You're not allowed to access past the end of the list. You can check how long th Select **Run** again to see the results. In C#, indices start at 0, so the largest valid index is one less than the number of items in the list. +For more information about indices, see the [Explore indexes and ranges](../../tutorials/ranges-indexes.md) article. + ## Search and sort lists Our samples use relatively small lists, but your applications might often create lists with many more elements, sometimes numbering in the thousands. To find elements in these larger collections, you need to search the list for different items. The method searches for an item and returns the index of the item. If the item isn't in the list, `IndexOf` returns `-1`. Try it to see how it works. Add the following code after what you wrote so far: