Skip to content

Commit eaf79ba

Browse files
Ron Petrushamairaw
andauthored
Replaced dropped text, fixed some formatting (dotnet#3001)
* Replaced dropped text, fixed some formatting * Additional changes * Update xml/System/InvalidOperationException.xml Co-Authored-By: Maira Wenzel <[email protected]>
1 parent 6bc2163 commit eaf79ba

File tree

21 files changed

+81
-89
lines changed

21 files changed

+81
-89
lines changed

xml/System.Collections.Generic/IList`1.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@
201201
## Remarks
202202
This property provides the ability to access a specific element in the collection by using the following syntax: `myCollection[index]`.
203203
204-
The C# language uses the keyword to define the indexers instead of implementing the <xref:System.Collections.Generic.IList%601.Item%2A> property. Visual Basic implements <xref:System.Collections.Generic.IList%601.Item%2A> as a default property, which provides the same indexing functionality.
204+
The C# language uses the [this](~/docs/csharp/language-reference/keywords/this.md) keyword to define the indexers instead of implementing the <xref:System.Collections.Generic.IList%601.Item%2A> property. Visual Basic implements <xref:System.Collections.Generic.IList%601.Item%2A> as a [default property](~/docs/visual-basic/language-reference/modifiers/default.md), which provides the same indexing functionality.
205205
206206
]]></format>
207207
</remarks>

xml/System.Collections.Generic/SortedDictionary`2+ValueCollection+Enumerator.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<format type="text/markdown"><![CDATA[
4848
4949
## Remarks
50-
The `foreach` statement of the C# (`for each` in C++, `For Each` in Visual Basic) hides the complexity of enumerators. Therefore, using `foreach` is recommended, instead of directly manipulating the enumerator. This type implements the
50+
The `foreach` statement of the C# (`for each` in C++, `For Each` in Visual Basic) hides the complexity of enumerators. Therefore, using `foreach` is recommended, instead of directly manipulating the enumerator. This type implements the <xref:System.Collections.Generic.IEnumerator%601> interface.
5151
5252
Enumerators can be used to read the data in the collection, but they cannot be used to modify the underlying collection.
5353

xml/System.Collections.Immutable/ImmutableInterlocked.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -656,8 +656,7 @@
656656
<param name="location">The variable or field to be changed, which may be accessed by multiple threads.</param>
657657
<param name="transformer">A function that mutates the value. This function should be side-effect free, as it may run multiple times when races occur with other threads.</param>
658658
<summary>Mutates a value in-place with optimistic locking transaction semantics via a specified transformation function. The transformation is retried as many times as necessary to win the optimistic locking race.</summary>
659-
<returns>
660-
<c>true</c> if the location's value is changed by applying the result of the <paramref name="transformer" /> function; <c>false</c> if the location's value remained the same because the last invocation of <paramref name="transformer" /> returned the existing value.</returns>
659+
<returns><see langword="true" /> if the location's value is changed by applying the result of the <paramref name="transformer" /> function; <see langword="false" /> if the location's value remained the same because the last invocation of <paramref name="transformer" /> returned the existing value.</returns>
661660
<remarks>To be added.</remarks>
662661
</Docs>
663662
</Member>
@@ -701,8 +700,7 @@
701700
<param name="transformer">A function that mutates the value. This function should be side-effect free, as it may run multiple times when races occur with other threads.</param>
702701
<param name="transformerArgument">The argument to pass to <paramref name="transformer" />.</param>
703702
<summary>Mutates a value in-place with optimistic locking transaction semantics via a specified transformation function. The transformation is retried as many times as necessary to win the optimistic locking race.</summary>
704-
<returns>
705-
<c>true</c> if the location's value is changed by applying the result of the <paramref name="transformer" /> function; <c>false</c> if the location's value remained the same because the last invocation of <paramref name="transformer" /> returned the existing value.</returns>
703+
<returns><see langword="true" /> if the location's value is changed by applying the result of the <paramref name="transformer" /> function; <see langword="false" /> if the location's value remained the same because the last invocation of <paramref name="transformer" /> returned the existing value.</returns>
706704
<remarks>To be added.</remarks>
707705
</Docs>
708706
</Member>

xml/System.Collections.ObjectModel/KeyedCollection`2.xml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -825,12 +825,10 @@
825825
826826
If the <xref:System.Collections.ObjectModel.KeyedCollection%602> has a lookup dictionary, `key` is used to retrieve the element from the dictionary. If there is no lookup dictionary, the key of each element is extracted using the <xref:System.Collections.ObjectModel.KeyedCollection%602.GetKeyForItem%2A> method and compared with the specified key.
827827
828-
The C# language uses the keyword to define the indexers instead of implementing the <xref:System.Collections.ObjectModel.KeyedCollection%602.Item%2A> property. Visual Basic implements <xref:System.Collections.ObjectModel.KeyedCollection%602.Item%2A> as a default property, which provides the same indexing functionality.
829-
830-
Retrieving the value of this property is an O(1) operation if the <xref:System.Collections.ObjectModel.KeyedCollection%602> has a lookup dictionary; otherwise it is an O(`n`) operation, where `n` is <xref:System.Collections.ObjectModel.Collection%601.Count%2A>.
831-
832-
828+
The C# language uses the [this](~/docs/csharp/language-reference/keywords/this.md) keyword to define the indexers instead of implementing the <xref:System.Collections.ObjectModel.KeyedCollection%602.Item%2A> property. Visual Basic implements <xref:System.Collections.ObjectModel.KeyedCollection%602.Item%2A> as a [default property](~/docs/visual-basic/language-reference/modifiers/default.md), which provides the same indexing functionality.
833829
830+
Retrieving the value of this property is an O(1) operation if the <xref:System.Collections.ObjectModel.KeyedCollection%602> has a lookup dictionary; otherwise it is an O(`n`) operation, where `n` is <xref:System.Collections.ObjectModel.Collection%601.Count%2A>.
831+
834832
## Examples
835833
This code example shows the minimum code necessary to derive a collection class from <xref:System.Collections.ObjectModel.KeyedCollection%602>: overriding the <xref:System.Collections.ObjectModel.KeyedCollection%602.GetKeyForItem%2A> method and providing a public constructor that delegates to a base class constructor. The code example also demonstrates many of the properties and methods inherited from <xref:System.Collections.ObjectModel.KeyedCollection%602> and <xref:System.Collections.ObjectModel.Collection%601> classes.
836834

xml/System.Collections.Specialized/BitVector32.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@
663663
664664
A <xref:System.Collections.Specialized.BitVector32.Section> is a window into the <xref:System.Collections.Specialized.BitVector32> and is composed of the smallest number of consecutive bits that can contain the maximum value specified in <xref:System.Collections.Specialized.BitVector32.CreateSection%2A>. For example, a section with a maximum value of 1 is composed of only one bit, whereas a section with a maximum value of 5 is composed of three bits. You can create a <xref:System.Collections.Specialized.BitVector32.Section> with a maximum value of 1 to serve as a Boolean, thereby allowing you to store integers and Booleans in the same <xref:System.Collections.Specialized.BitVector32>.
665665
666-
The C# language uses the keyword to define the indexers instead of implementing the <xref:System.Collections.Specialized.BitVector32.Item%2A> property. Visual Basic implements <xref:System.Collections.Specialized.BitVector32.Item%2A> as a default property, which provides the same indexing functionality.
666+
The C# language uses the [this](~/docs/csharp/language-reference/keywords/this.md) keyword to define the indexers instead of implementing the <xref:System.Collections.Specialized.BitVector32.Item%2A> property. Visual Basic implements <xref:System.Collections.Specialized.BitVector32.Item%2A> as a [default property](~/docs/visual-basic/language-reference/modifiers/default.md), which provides the same indexing functionality.
667667
668668
Retrieving the value of this property is an O(1) operation; setting the property is also an O(1) operation.
669669
@@ -719,7 +719,7 @@
719719
720720
Using this property on a <xref:System.Collections.Specialized.BitVector32> that is set up as sections might cause unexpected results.
721721
722-
The C# language uses the keyword to define the indexers instead of implementing the <xref:System.Collections.Specialized.BitVector32.Item%2A> property. Visual Basic implements <xref:System.Collections.Specialized.BitVector32.Item%2A> as a default property, which provides the same indexing functionality.
722+
The C# language uses the [this](~/docs/csharp/language-reference/keywords/this.md) keyword to define the indexers instead of implementing the <xref:System.Collections.Specialized.BitVector32.Item%2A> property. Visual Basic implements <xref:System.Collections.Specialized.BitVector32.Item%2A> as a [default property](~/docs/visual-basic/language-reference/modifiers/default.md), which provides the same indexing functionality.
723723
724724
Retrieving the value of this property is an O(1) operation; setting the property is also an O(1) operation.
725725

xml/System.Collections.Specialized/IOrderedDictionary.xml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,13 @@
256256
<remarks>
257257
<format type="text/markdown"><![CDATA[
258258
259-
## Remarks
260-
<xref:System.Collections.Specialized.IOrderedDictionary> accepts `null` as a valid value and allows duplicate elements.
261-
262-
The C# language uses the keyword to define the indexers instead of implementing the <xref:System.Collections.Specialized.IOrderedDictionary.Item%2A> property. Visual Basic implements <xref:System.Collections.Specialized.IOrderedDictionary.Item%2A> as a default property, which provides the same indexing functionality.
263-
264-
This property allows you to access a specific element in the collection by using the following syntax:
259+
## Remarks
260+
261+
<xref:System.Collections.Specialized.IOrderedDictionary> accepts `null` as a valid value and allows duplicate elements.
262+
263+
The C# language uses the [this](~/docs/csharp/language-reference/keywords/this.md) keyword to define the indexers instead of implementing the <xref:System.Collections.Specialized.IOrderedDictionary.Item%2A> property. Visual Basic implements <xref:System.Collections.Specialized.IOrderedDictionary.Item%2A> as a [default property](~/docs/visual-basic/language-reference/modifiers/default.md), which provides the same indexing functionality.
264+
265+
This property allows you to access a specific element in the collection by using the following syntax:
265266
266267
[!code-cpp[System.Collections.Specialized.IOrderedDictionary_Implementation#04](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Specialized.IOrderedDictionary_Implementation/cpp/remarks.cpp#04)]
267268
[!code-csharp[System.Collections.Specialized.IOrderedDictionary_Implementation#04](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Specialized.IOrderedDictionary_Implementation/cs/remarks.cs#04)]

xml/System.Collections.Specialized/NameObjectCollectionBase+KeysCollection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@
256256
## Remarks
257257
This property provides the ability to access a specific element in the collection by using the following syntax: `myCollection[index]` (In Visual Basic, `myCollection(index)`).
258258
259-
The C# language uses the keyword to define the indexers instead of implementing the <xref:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection.Item%2A> property. Visual Basic implements <xref:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection.Item%2A> as a default property, which provides the same indexing functionality.
259+
The C# language uses the [this](~/docs/csharp/language-reference/keywords/this.md) keyword to define the indexers instead of implementing the <xref:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection.Item%2A> property. Visual Basic implements <xref:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection.Item%2A> as a [default property](~/docs/visual-basic/language-reference/modifiers/default.md), which provides the same indexing functionality.
260260
261261
Retrieving the value of this property is an O(1) operation; setting the property is also an O(1) operation.
262262

xml/System.Collections.Specialized/NameValueCollection.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,7 @@
13271327
13281328
This property cannot be set. To set the value at a specified index, use `Item[GetKey(index)]`.
13291329
1330-
The C# language uses the keyword to define the indexers instead of implementing the <xref:System.Collections.Specialized.NameValueCollection.Item%2A> property. Visual Basic implements <xref:System.Collections.Specialized.NameValueCollection.Item%2A> as a default property, which provides the same indexing functionality.
1330+
The C# language uses the [this](~/docs/csharp/language-reference/keywords/this.md) keyword to define the indexers instead of implementing the <xref:System.Collections.Specialized.NameValueCollection.Item%2A> property. Visual Basic implements <xref:System.Collections.Specialized.NameValueCollection.Item%2A> as a [default property](~/docs/visual-basic/language-reference/modifiers/default.md), which provides the same indexing functionality.
13311331
13321332
Retrieving the values at the specified index is an O(`n`) operation, where `n` is the number of values.
13331333
@@ -1397,7 +1397,7 @@
13971397
> [!CAUTION]
13981398
> This property returns `null` in the following cases: 1) if the specified key is not found; and 2) if the specified key is found and its associated value is `null`. This property does not distinguish between the two cases.
13991399
1400-
The C# language uses the keyword to define the indexers instead of implementing the <xref:System.Collections.Specialized.NameValueCollection.Item%2A> property. Visual Basic implements <xref:System.Collections.Specialized.NameValueCollection.Item%2A> as a default property, which provides the same indexing functionality.
1400+
The C# language uses the [this](~/docs/csharp/language-reference/keywords/this.md) keyword to define the indexers instead of implementing the <xref:System.Collections.Specialized.NameValueCollection.Item%2A> property. Visual Basic implements <xref:System.Collections.Specialized.NameValueCollection.Item%2A> as a [default property](~/docs/visual-basic/language-reference/modifiers/default.md), which provides the same indexing functionality.
14011401
14021402
Retrieving or setting the values associated with the specified key is an O(`n`) operation, where `n` is the number of values.
14031403

xml/System.Collections.Specialized/OrderedDictionary.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@
964964
## Remarks
965965
This property allows you to access a specific element in the collection by using the following syntax: `myCollection[index]`.
966966
967-
The C# language uses the keyword to define the indexers instead of implementing the <xref:System.Collections.Specialized.OrderedDictionary.Item%2A> property. Visual Basic implements <xref:System.Collections.Specialized.OrderedDictionary.Item%2A> as a default property, which provides the same indexing functionality.
967+
The C# language uses the [this](~/docs/csharp/language-reference/keywords/this.md) keyword to define the indexers instead of implementing the <xref:System.Collections.Specialized.OrderedDictionary.Item%2A> property. Visual Basic implements <xref:System.Collections.Specialized.OrderedDictionary.Item%2A> as a [default property](~/docs/visual-basic/language-reference/modifiers/default.md), which provides the same indexing functionality.
968968
969969
]]></format>
970970
</remarks>

xml/System.Collections.Specialized/StringCollection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@
837837
838838
<xref:System.Collections.Specialized.StringCollection> accepts `null` as a valid value and allows duplicate elements.
839839
840-
The C# language uses the keyword to define the indexers instead of implementing the <xref:System.Collections.Specialized.StringCollection.Item%2A> property. Visual Basic implements <xref:System.Collections.Specialized.StringCollection.Item%2A> as a default property, which provides the same indexing functionality.
840+
The C# language uses the [this](~/docs/csharp/language-reference/keywords/this.md) keyword to define the indexers instead of implementing the <xref:System.Collections.Specialized.StringCollection.Item%2A> property. Visual Basic implements <xref:System.Collections.Specialized.StringCollection.Item%2A> as a [default property](~/docs/visual-basic/language-reference/modifiers/default.md), which provides the same indexing functionality.
841841
842842
Retrieving the value of this property is an O(1) operation; setting the property is also an O(1) operation.
843843

0 commit comments

Comments
 (0)