Skip to content

Commit fd7e57e

Browse files
committed
Remove unclear remarks
1 parent f9cddc6 commit fd7e57e

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/ConditionalWeakTable.cs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ public ConditionalWeakTable()
4949
/// </param>
5050
/// <returns>Returns "true" if key was found, "false" otherwise.</returns>
5151
/// <exception cref="ArgumentNullException"><paramref name="key"/> is <see langword="null"/>.</exception>
52-
/// <remarks>
53-
/// The key may get garbage collected during the TryGetValue operation. If so, TryGetValue
54-
/// may at its discretion, return "false" and set "value" to the default (as if the key was not present.)
55-
/// </remarks>
5652
public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
5753
{
5854
if (key is null)
@@ -67,11 +63,7 @@ public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
6763
/// <param name="key">key to add. May not be null.</param>
6864
/// <param name="value">value to associate with key.</param>
6965
/// <exception cref="ArgumentNullException"><paramref name="key"/> is <see langword="null"/>.</exception>
70-
/// <remarks>
71-
/// If the key is already entered into the dictionary, this method throws an exception.
72-
/// The key may get garbage collected during the Add() operation. If so, Add()
73-
/// has the right to consider any prior entries successfully removed and add a new entry without
74-
/// throwing an exception.
66+
/// <exception cref="ArgumentException"><paramref name="key"/> is already entered into the dictionary.</exception>
7567
/// </remarks>
7668
public void Add(TKey key, TValue value)
7769
{
@@ -148,11 +140,6 @@ public void AddOrUpdate(TKey key, TValue value)
148140
/// <param name="key">The key to remove.</param>
149141
/// <returns><see langword="true"/> if the key is found and removed; otherwise, <see langword="false"/>.</returns>
150142
/// <exception cref="ArgumentNullException"><paramref name="key"/> is <see langword="null"/>.</exception>
151-
/// <remarks>
152-
/// The key may get garbage collected during the <see cref="Remove(TKey)"/> operation. If so,
153-
/// <see cref="Remove(TKey)"/> will not fail or throw, however, the return value can be either
154-
/// true or false depending on who wins the race.
155-
/// </remarks>
156143
public bool Remove(TKey key)
157144
{
158145
if (key is null)
@@ -171,11 +158,6 @@ public bool Remove(TKey key)
171158
/// <param name="value">value removed from the table, if it was present.</param>
172159
/// <returns><see langword="true"/> if the key is found and removed; otherwise, <see langword="false"/>.</returns>
173160
/// <exception cref="ArgumentNullException"><paramref name="key"/> is <see langword="null"/>.</exception>
174-
/// <remarks>
175-
/// The key may get garbage collected during the <see cref="Remove(TKey, out TValue)"/> operation. If so,
176-
/// <see cref="Remove(TKey, out TValue)"/> will not fail or throw, however, the return value can be either
177-
/// true or false depending on who wins the race.
178-
/// </remarks>
179161
public bool Remove(TKey key, [MaybeNullWhen(false)] out TValue value)
180162
{
181163
if (key is null)

0 commit comments

Comments
 (0)