Skip to content

Commit

Permalink
Update TagName docs to include behavior if tag is not found (#109934)
Browse files Browse the repository at this point in the history
* Clarify documentation for TagList.IndexOf

Adds documentation to TagList.IndexOf that states the behavior when the key was not found.

* Clarify documentation for TagList.IndexOf

Adds documentation to TagList.IndexOf that states the behavior when the key was not found.
  • Loading branch information
mpdelbuono authored Dec 17, 2024
1 parent 78ede32 commit e654570
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ public bool Remove(KeyValuePair<string, object?> item)
/// Searches for the specified tag and returns the zero-based index of the first occurrence within the entire <see cref="T:System.Diagnostics.TagList" />.
/// </summary>
/// <param name="item">The tag to locate in the <see cref="T:System.Diagnostics.TagList" />.</param>
/// <returns>The zero-based index of the first occurrence within the <see cref="T:System.Diagnostics.TagList" />, or -1 if there is no such tag.</returns>
public readonly int IndexOf(KeyValuePair<string, object?> item)
{
ReadOnlySpan<KeyValuePair<string, object?>> tags =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ public bool Remove(KeyValuePair<string, object?> item)
/// Searches for the specified tag and returns the zero-based index of the first occurrence within the entire <see cref="T:System.Diagnostics.TagList" />.
/// </summary>
/// <param name="item">The tag to locate in the <see cref="T:System.Diagnostics.TagList" />.</param>
/// <returns>The zero-based index of the first occurrence within the <see cref="T:System.Diagnostics.TagList" />, or -1 if there is no such tag.</returns>
public readonly int IndexOf(KeyValuePair<string, object?> item)
{
if (_overflowTags is not null)
Expand Down

0 comments on commit e654570

Please sign in to comment.