Skip to content

Commit 5534643

Browse files
committed
Removed unnecessary nullability attribute
1 parent cd3c560 commit 5534643

File tree

2 files changed

+2
-31
lines changed

2 files changed

+2
-31
lines changed

Microsoft.Toolkit/Attributes/MaybeNullWhenAttribute.cs

Lines changed: 0 additions & 29 deletions
This file was deleted.

Microsoft.Toolkit/Extensions/StringExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public static class StringExtensions
6262
/// </summary>
6363
/// <param name="str">The string to test.</param>
6464
/// <returns><c>true</c> for a valid decimal number; otherwise, <c>false</c>.</returns>
65-
public static bool IsDecimal([NotNullWhen(true), MaybeNullWhen(false)] this string? str)
65+
public static bool IsDecimal([NotNullWhen(true)] this string? str)
6666
{
6767
return decimal.TryParse(str, NumberStyles.Number, CultureInfo.InvariantCulture, out _);
6868
}
@@ -72,7 +72,7 @@ public static bool IsDecimal([NotNullWhen(true), MaybeNullWhen(false)] this stri
7272
/// </summary>
7373
/// <param name="str">The string to test.</param>
7474
/// <returns><c>true</c> for a valid integer; otherwise, <c>false</c>.</returns>
75-
public static bool IsNumeric([NotNullWhen(true), MaybeNullWhen(false)] this string? str)
75+
public static bool IsNumeric([NotNullWhen(true)] this string? str)
7676
{
7777
return int.TryParse(str, out _);
7878
}

0 commit comments

Comments
 (0)