From C# Language Specification, § 2.4.2 Identifiers (C#) :
> The prefix "@" enables the use of keywords as identifiers, which is useful when interfacing with other programming languages. The character @ is not actually part of the identifier, so the identifier might be seen in other languages as a normal identifier, without the prefix. An identifier with an @ prefix is called a verbatim identifier.
Given this code:
[DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr sass_map_set_key(IntPtr @value_map, int @index, IntPtr @key);
> Name 'value_map' does not match rule Parameters. Suggested name is 'valueMap'.
In fact, the value_map is depicting the name used in external C lib code.
Having said that, IMO:
- It would be nice if ReSharper interpret extern and `@`-prefixed parameter as a special case and skip InconsistentNaming warning.
- The ultimate introspection feature would be: if external library is reachable and Resharper shell out the command `Dumpbin /exports <libpath>` to export the names, inspect the names and match the casing to one defined in C# extern signature to rather suggest the exact casing used in C lib (prefixed with verbatim identifier).