Skip to content

Commit f2fb6cc

Browse files
Merge pull request #1886 from WeihanLi/patch-1
use nameof for CallerArgumentExpression
2 parents 95e25ba + c08c3b6 commit f2fb6cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Microsoft.OpenApi/Utils.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ internal static class Utils
2020
/// <returns>The input value.</returns>
2121
internal static T CheckArgumentNull<T>(
2222
T value,
23-
[CallerArgumentExpression("value")] string parameterName = "")
23+
[CallerArgumentExpression(nameof(value))] string parameterName = "")
2424
{
2525
return value ?? throw new ArgumentNullException(parameterName, $"Value cannot be null: {parameterName}");
2626
}

0 commit comments

Comments
 (0)