From 46148db247dd5ca3d6b4ddff9ae5333bfa06f262 Mon Sep 17 00:00:00 2001
From: Weihan Li <7604648+WeihanLi@users.noreply.github.com>
Date: Thu, 24 Oct 2024 07:59:45 +0800
Subject: [PATCH] use nameof for CallerArgumentExpression
---
src/Shared/ThrowHelpers/ArgumentNullThrowHelper.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Shared/ThrowHelpers/ArgumentNullThrowHelper.cs b/src/Shared/ThrowHelpers/ArgumentNullThrowHelper.cs
index fd0129fb3..cda36bb08 100644
--- a/src/Shared/ThrowHelpers/ArgumentNullThrowHelper.cs
+++ b/src/Shared/ThrowHelpers/ArgumentNullThrowHelper.cs
@@ -11,7 +11,7 @@ internal static partial class ArgumentNullThrowHelper
/// Throws an if is null.
/// The reference type argument to validate as non-null.
/// The name of the parameter with which corresponds.
- public static void ThrowIfNull([NotNull] object? argument, [CallerArgumentExpression("argument")] string? paramName = null)
+ public static void ThrowIfNull([NotNull] object? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
{
#if !NET7_0_OR_GREATER
if (argument is null)