"Phill W." wrote:
>>But if the condition in question is totally "benign", why is it being
flagged up with a Warning in the first place?
The compiler only has knowledge of the direct context of the line of code
and the warnings are more often than not warnings that do not (indeed can
not) have real meaning in the context of the complete application using the
code, indeed this is acknowledged in the help file describing these
warnings. As an example consider this warning:
Type of member '<membername>' is not CLS-compliant
And the following comment in the "To correct this error" paragraph:
a.. If your component interfaces only with other .NET Framework components,
or does not interface with any other components, you do not need to change
anything.
The other warnings are very similar in nature. While one appreciates a well
written compiler raising such warnings it is not omnipotent and therefore a
mechanism should be available to suppress specific warnings on an instance
by instance basis rather than the rather more dangerous suppression of the
warning globally.
Sid.