From c79de9fdd1d47bd0efe624a4ef6fe6e43517d5f2 Mon Sep 17 00:00:00 2001 From: "software9119.technology" Date: Thu, 17 Sep 2026 00:17:34 +0200 Subject: [PATCH] Example improvement --- docs/fundamentals/code-analysis/style-rules/ide0340.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/fundamentals/code-analysis/style-rules/ide0340.md b/docs/fundamentals/code-analysis/style-rules/ide0340.md index 9d8d37aabc262..c86882b88d56f 100644 --- a/docs/fundamentals/code-analysis/style-rules/ide0340.md +++ b/docs/fundamentals/code-analysis/style-rules/ide0340.md @@ -49,6 +49,11 @@ string name = nameof(List); string name = nameof(List<>); ``` +```csharp +// The resultant string output is the same for both options. +nameof(List) == nameof(List<>) // true +``` + ## Suppress a warning If you want to suppress only a single violation, add preprocessor directives to your source file to disable and then re-enable the rule.