Does VB.Net have an equivalent to #pragma warning disable/restore?

后端 未结 2 1085
忘了有多久
忘了有多久 2021-01-08 00:45

I\'ve found a way to disable warnings for an entire VB.NET project, but that is very undesirable. I would like to disable a certain warning for the scope of one method at mo

2条回答
  •  庸人自扰
    2021-01-08 01:10

    Unfortunately the answer is no, the VB.NET compiler doesn't support suppression of warnings in such a manner. You would have to re-factor your VB.NET code or look at some other alternative like writing some of the code in C#.

提交回复
热议问题