Skip to content

Commit 1ad0540

Browse files
authored
Remove incorrect exception comment from AsSpan (#66051)
This method never throws an `ArgumentNullException` for a null `text` input, and is even annotated as accepting `string?`.
1 parent 96d7d90 commit 1ad0540

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ public static ReadOnlySpan<char> AsSpan(this string? text)
101101
/// </summary>
102102
/// <param name="text">The target string.</param>
103103
/// <param name="start">The index at which to begin this slice.</param>
104-
/// <exception cref="System.ArgumentNullException">Thrown when <paramref name="text"/> is null.</exception>
105104
/// <exception cref="System.ArgumentOutOfRangeException">
106105
/// Thrown when the specified <paramref name="start"/> index is not in range (&lt;0 or &gt;text.Length).
107106
/// </exception>

0 commit comments

Comments
 (0)