I get this warning:
Rename virtual/interface member IFileWatcher.Stop() so that it no longer conflicts with the reserved language keyword 'Stop'. Using a reserved keyword as the name of a virtual/interface member makes it harder for consumers in other languages to override/implement the member.
But I can't find it on the list on this page, it should be updated (or the warning is wrong).
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
I don't think C# have a keyword named "Stop". It's a VB keyword.
The analyzer does seem to always lookup for all keywords regardless of the language.
@mavasani, Is this behavior intended?
cc: @Evangelink
@Youssef1313 I'm pretty sure it is. As the message implies, this warning exists so that code written in one language can be easily consumed from other .Net languages. That's why it's warning about VB keywords in C# code.
@svick Ahh, I didn't read the message till the end 😄
@SpaceOgre I think you can do one of the following:
Yes, this is by design.
Thank you for the clarification. It would be nice if this was added to the documentation then for the analyzer error code. Will create an issue for that over there.
Most helpful comment
@Youssef1313 I'm pretty sure it is. As the message implies, this warning exists so that code written in one language can be easily consumed from other .Net languages. That's why it's warning about VB keywords in C# code.