Skip to content

Commit 621b779

Browse files
add links that reference the 'Explore indexes and ranges' article (#48065)
* add links that reference the 'Explore indexes and ranges' article * remove unnecessary links * add more links
1 parent b35c72e commit 621b779

File tree

6 files changed

+12
-0
lines changed

6 files changed

+12
-0
lines changed

docs/csharp/how-to/parse-strings-using-split.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ The <xref:System.String.Split*?displayProperty=nameWithType> has many overloads.
3838

3939
The remaining examples use different overloads to show each of these behaviors.
4040

41+
For more information about indices, see the [Explore indexes and ranges](../tutorials/ranges-indexes.md) article.
42+
4143
## Specify multiple separators
4244

4345
<xref:System.String.Split%2A?displayProperty=nameWithType> can use multiple separator characters. The following example uses spaces, commas, periods, colons, and tabs as separating characters, which are passed to <xref:System.String.Split%2A> in an array. The loop at the bottom of the code displays each of the words in the returned array.

docs/csharp/language-reference/builtin-types/arrays.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ A *single-dimensional array* is a sequence of like elements. You access an eleme
7777
7878
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`.
7979
80+
For more information about indices, see the [Explore indexes and ranges](../../tutorials/ranges-indexes.md) article.
81+
8082
### Pass single-dimensional arrays as arguments
8183
8284
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.

docs/csharp/language-reference/builtin-types/collections.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ For the type of elements in the <xref:System.Collections.Generic.List%601>, you
4242

4343
:::code language="csharp" source="./snippets/shared/Collections.cs" id="SnippetCustomList":::
4444

45+
For more information about indices, see the [Explore indexes and ranges](../../tutorials/ranges-indexes.md) article.
46+
4547
## Key/value pair collections
4648

4749
These examples use the <xref:System.Collections.Generic.Dictionary%602> 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.

docs/csharp/programming-guide/strings/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ If the <xref:System.String> methods don't provide the functionality that you mus
150150

151151
:::code language="csharp" source="./snippets/StringCharacters.cs" id="AccessChars":::
152152

153+
For more information about indices, see the [Explore indexes and ranges](../../tutorials/ranges-indexes.md) article.
154+
153155
## Null strings and empty strings
154156

155157
An empty string is an instance of a <xref:System.String?displayProperty=nameWithType> 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 <xref:System.String?displayProperty=nameWithType> objects. Empty strings are initialized as follows:

docs/csharp/tour-of-csharp/overview.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ You can use *index* and *range* expressions to retrieve one or more elements fro
8888

8989
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.
9090

91+
For more information about index and range expressions, see the [Explore indexes and ranges](../tutorials/ranges-indexes.md) article.
92+
9193
[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:
9294

9395
:::code language="csharp" source="./snippets/shared/LinqExample.cs" id="LinqExampleQuery":::

docs/csharp/tour-of-csharp/tutorials/list-collection.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ You're not allowed to access past the end of the list. You can check how long th
4545

4646
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.
4747

48+
For more information about indices, see the [Explore indexes and ranges](../../tutorials/ranges-indexes.md) article.
49+
4850
## Search and sort lists
4951

5052
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 <xref:System.Collections.Generic.List%601.IndexOf%2A> 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:

0 commit comments

Comments
 (0)