Skip to content

Commit e82dfc3

Browse files
authored
Typo fixes in about_Calling_Generic_Methods (#12134)
* Update about_Calling_Generic_Methods.md Fix typos * Update about_Calling_Generic_Methods.md Fix typos * Update about_Calling_Generic_Methods.md Typo fixes
1 parent dfd636b commit e82dfc3

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

reference/7.4/Microsoft.PowerShell.Core/About/about_Calling_Generic_Methods.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ title: about_Calling_Generic_Methods
1111
Generics let you tailor a method, class, structure, or interface to the precise
1212
data type it acts upon. For example, instead of using the
1313
[System.Collections.Hashtable][01] class, which allows keys and values to be
14-
of any type, you can use the [System.Collections.Generic.Dictionary%602][02]
14+
of any type, you can use the [System.Collections.Generic.Dictionary][02]
1515
generic class and specify the types allowed for the **key** and **value**
1616
properties. Generics provide increased code reusability and type safety.
1717

@@ -22,8 +22,8 @@ overloads, or when the generic method takes no formal parameter. PowerShell can
2222
fail to resolve the correct method without the explicit generic method
2323
arguments.
2424

25-
For example, `[array]::Empty<T>()`. The .NET **Array** class has a static,
26-
generic method `Empty<T>()` that takes no formal parameters.
25+
For example, `[array]::Empty[T]()`. The .NET **Array** class has a static,
26+
generic method `Empty[T]()` that takes no formal parameters.
2727

2828
Prior to PowerShell 7.3, to ensure proper method resolution you had to use
2929
complicated workarounds using .NET reflection. For an example, see Lee Holmes'
@@ -61,10 +61,10 @@ In this example, we create a list of integers then use the
6161
`System.Linq.Enumerable` class to enumerate the values and transform them to a
6262
new value.
6363

64-
The variable `$list` is a generic `List<T>` object that can only contain
65-
integers. `List<T>` is a generic class that allows you to specify the type of
64+
The variable `$list` is a generic `List[T]` object that can only contain
65+
integers. `List[T]` is a generic class that allows you to specify the type of
6666
its members when you create it.
67-
`[System.Linq.Enumerable]::Select<T1,T2>(T1,T2)` is a generic method that
67+
`[System.Linq.Enumerable]::Select[T1,T2](T1,T2)` is a generic method that
6868
require two generic type parameters and two formal value parameters.
6969

7070
```powershell

reference/7.5/Microsoft.PowerShell.Core/About/about_Calling_Generic_Methods.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ title: about_Calling_Generic_Methods
1111
Generics let you tailor a method, class, structure, or interface to the precise
1212
data type it acts upon. For example, instead of using the
1313
[System.Collections.Hashtable][01] class, which allows keys and values to be
14-
of any type, you can use the [System.Collections.Generic.Dictionary%602][02]
14+
of any type, you can use the [System.Collections.Generic.Dictionary][02]
1515
generic class and specify the types allowed for the **key** and **value**
1616
properties. Generics provide increased code reusability and type safety.
1717

@@ -22,8 +22,8 @@ overloads, or when the generic method takes no formal parameter. PowerShell can
2222
fail to resolve the correct method without the explicit generic method
2323
arguments.
2424

25-
For example, `[array]::Empty<T>()`. The .NET **Array** class has a static,
26-
generic method `Empty<T>()` that takes no formal parameters.
25+
For example, `[array]::Empty[T]()`. The .NET **Array** class has a static,
26+
generic method `Empty[T]()` that takes no formal parameters.
2727

2828
Prior to PowerShell 7.3, to ensure proper method resolution you had to use
2929
complicated workarounds using .NET reflection. For an example, see Lee Holmes'
@@ -61,10 +61,10 @@ In this example, we create a list of integers then use the
6161
`System.Linq.Enumerable` class to enumerate the values and transform them to a
6262
new value.
6363

64-
The variable `$list` is a generic `List<T>` object that can only contain
65-
integers. `List<T>` is a generic class that allows you to specify the type of
64+
The variable `$list` is a generic `List[T]` object that can only contain
65+
integers. `List[T]` is a generic class that allows you to specify the type of
6666
its members when you create it.
67-
`[System.Linq.Enumerable]::Select<T1,T2>(T1,T2)` is a generic method that
67+
`[System.Linq.Enumerable]::Select[T1,T2](T1,T2)` is a generic method that
6868
require two generic type parameters and two formal value parameters.
6969

7070
```powershell

reference/7.6/Microsoft.PowerShell.Core/About/about_Calling_Generic_Methods.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ title: about_Calling_Generic_Methods
1111
Generics let you tailor a method, class, structure, or interface to the precise
1212
data type it acts upon. For example, instead of using the
1313
[System.Collections.Hashtable][01] class, which allows keys and values to be
14-
of any type, you can use the [System.Collections.Generic.Dictionary%602][02]
14+
of any type, you can use the [System.Collections.Generic.Dictionary][02]
1515
generic class and specify the types allowed for the **key** and **value**
1616
properties. Generics provide increased code reusability and type safety.
1717

@@ -22,8 +22,8 @@ overloads, or when the generic method takes no formal parameter. PowerShell can
2222
fail to resolve the correct method without the explicit generic method
2323
arguments.
2424

25-
For example, `[array]::Empty<T>()`. The .NET **Array** class has a static,
26-
generic method `Empty<T>()` that takes no formal parameters.
25+
For example, `[array]::Empty[T]()`. The .NET **Array** class has a static,
26+
generic method `Empty[T]()` that takes no formal parameters.
2727

2828
Prior to PowerShell 7.3, to ensure proper method resolution you had to use
2929
complicated workarounds using .NET reflection. For an example, see Lee Holmes'
@@ -61,10 +61,10 @@ In this example, we create a list of integers then use the
6161
`System.Linq.Enumerable` class to enumerate the values and transform them to a
6262
new value.
6363

64-
The variable `$list` is a generic `List<T>` object that can only contain
65-
integers. `List<T>` is a generic class that allows you to specify the type of
64+
The variable `$list` is a generic `List[T]` object that can only contain
65+
integers. `List[T]` is a generic class that allows you to specify the type of
6666
its members when you create it.
67-
`[System.Linq.Enumerable]::Select<T1,T2>(T1,T2)` is a generic method that
67+
`[System.Linq.Enumerable]::Select[T1,T2](T1,T2)` is a generic method that
6868
require two generic type parameters and two formal value parameters.
6969

7070
```powershell

0 commit comments

Comments
 (0)