visual studio 2005 - How to suppress compiler warning for specific function in VS2005 (VB.Net) -


i have class inherits base class , implements following...

    public function compareto(byval obj object) integer implements system.icomparable.compareto 

now base class inherits implements system.icomparable.compareto i'm getting following compiler warning:

warning: 'system.icomparable.compareto' implemented base class. re-implementation of function assumed.

i'm fine question how can suppress warning function (i.e. not such warnings).

clarifications:

  • here link error on msdn.
  • i've tried both shadows , overrides , neither eliminates warning.
  • the warning isn't on method (unless shadows or overrides omitted), rather it's on "implements system.icomparable.compareto" specifically.
  • i not looking suppress warnings of type (if crop up), one.

solution:
hoping use system.diagnostics.codeanalysis.suppressmessage attribute or c#'s #pragma looks there's no way suppress warning single line. there way turn message off project though, without turning all warnings off.

i manually edited .vbproj file , included 42015 in node debug , release compilations. not ideal better seeing warning in ide.

if has better solution please add , i'll gladly try flag answer.

only use 'implements' in base class:

signature in base class:

public overridable function compareto(byval obj object) integer implements system.icomparable.compareto 

signature in inherited class:

public overrides function compareto(byval obj object) integer 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -