We have recently started using FxCop on our code base and I am in the process of evaluating the problems. One is the IdentifiersShouldNotMatchKeywords issue. This applies to a namespace company.blah.Event, which it wants me to change to something else as event is a keyword. The docs say:
When to Suppress Warnings
Do not suppress a warning from this rule. The library might not be usable in all available languages in the .NET Framework.
under what circumstances might it not be available? Do I need to change this? I imagine that it is not going to be very popular.
Different languages have different keywords. For example I can use
Ifas a variable in C#, but if someone loads up the project in VB, they’re screwed, any case like that can cause problems.I’d change it, just to be safe. I’d say you need to change it if anyone else is consuming your library, you can’t know what language they’re going to use when doing so.