From 8c10c96224c013d76d0b54da56d28e85c7c50ee4 Mon Sep 17 00:00:00 2001 From: Martin Costello Date: Mon, 29 Nov 2021 09:57:28 +0000 Subject: [PATCH] Simplify code example (#24100) Remove the second parameter as the compiler will do that for you automatically in C#10. --- .../minimal-apis/samples/WebMinAPIs/ResultsExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/fundamentals/minimal-apis/samples/WebMinAPIs/ResultsExtensions.cs b/aspnetcore/fundamentals/minimal-apis/samples/WebMinAPIs/ResultsExtensions.cs index 963b22883f..e0bc766b4f 100644 --- a/aspnetcore/fundamentals/minimal-apis/samples/WebMinAPIs/ResultsExtensions.cs +++ b/aspnetcore/fundamentals/minimal-apis/samples/WebMinAPIs/ResultsExtensions.cs @@ -4,7 +4,7 @@ static class ResultsExtensions { public static IResult Html(this IResultExtensions resultExtensions, string html) { - ArgumentNullException.ThrowIfNull(resultExtensions, nameof(resultExtensions)); + ArgumentNullException.ThrowIfNull(resultExtensions); return new HtmlResult(html); }