Suppressing FXCOP error for vb.net Method

43 Views Asked by At

I want to suppress FXCOP error(CA1811) for specific vb.net function.
Like <SuppressMessage()> in c#, do we alternative of this in VB.net?

I am new to vb.net.

1

There are 1 best solutions below

1
On

FXCop analyzes the compiled assemblies, i.e., it doesn't care whether the assembly was written in C# or VB.NET.

Thus, the same technique that works in C# should also work in VB.NET. Note that, in VB.NET, the syntax for adding attributes is [SuppressMessage(...)] rather than C#'s <SuppressMessage(...)>.