Karthik Karnam
Karthik Karnam

Reputation: 168

Suppressing FXCOP error for vb.net Method

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.

Upvotes: 2

Views: 40

Answers (1)

Heinzi
Heinzi

Reputation: 172418

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(...)>.

Upvotes: 0

Related Questions