The ability to target the common language runtime from several languages means that clashes are possible when a word that is reserved in one language is used as the name of a namespace, type or member in another.


This rule raises an issue when a keyword from {cpp}/CLI, C# or Visual Basic is used as an identifier.

== Noncompliant Code Example

[source,csharp]
----
public string nameof(string s) { return s; }  // Noncompliant
...
public string Hello { get { return "World!"; } }
...
Console.WriteLine(nameof(Hello)); // prints "World!" instead of "Hello" as expected
----

== Compliant Solution

[source,csharp]
----
public string GetValue(string s) { return s; }
...
public string Hello { get { return "World!"; } }
...
Console.WriteLine(GetValue(Hello));
----

ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

include::../message.adoc[]

'''
== Comments And Links
(visible only on this page)

include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]
