Skip to content

Commit 46b0e04

Browse files
BrunoJuchliRon Petrusha
authored andcommitted
Improve ConcurrentDictionary.TryUpdate (dotnet#163)
Improve the summary of ConcurrentyDictionary.TryUpdate. The summary mentions parameters in a different order and with different names than they are represented in the method signature. This is confusing: ![image](https://user-images.githubusercontent.com/2090172/39812540-579f1164-538d-11e8-8e2d-cb58b4508a66.png) To clear things up, I've rephrased the summary to mention parameters in the same order as they occur in the method signature and used <paramref name="XYZ"/> to reference them. Note: I'm "cross-PR-ing" this from dotnet/corefx#29599 Though I'm wondering a bit about the duplication of the api-doc. Will we really have to maintain the code-doc twice? Will one become obsolete? Will they be merged (one-way or two-way) automagically? I haven't found anything on that topic in the contribution guide. But then I admit I didn't read every word of it, either...
1 parent 29ca242 commit 46b0e04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xml/System.Collections.Concurrent/ConcurrentDictionary`2.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1994,7 +1994,7 @@
19941994
<param name="key">The key whose value is compared with <c>comparisonValue</c> and possibly replaced.</param>
19951995
<param name="newValue">The value that replaces the value of the element that has the specified <c>key</c> if the comparison results in equality.</param>
19961996
<param name="comparisonValue">The value that is compared to the value of the element that has the specified <c>key</c>.</param>
1997-
<summary>Compares the existing value for the specified key with a specified value, and if they are equal, updates the key with a third value.</summary>
1997+
<summary>Updates the value associated with <paramref name="key" /> to <paramref name="newValue" /> if the existing value is equal to <paramref name="comparisonValue" />.</summary>
19981998
<returns>
19991999
<see langword="true" /> if the value with <paramref name="key" /> was equal to <paramref name="comparisonValue" /> and was replaced with <paramref name="newValue" />; otherwise, <see langword="false" />.</returns>
20002000
<remarks>
@@ -2047,4 +2047,4 @@
20472047
</Docs>
20482048
</Member>
20492049
</Members>
2050-
</Type>
2050+
</Type>

0 commit comments

Comments
 (0)