8

I know the #warning directive does not exist in vb.net... is there anything like it?
I want to be able to throw messages (warnings) at compiler time.

Helen
  • 87,344
  • 17
  • 243
  • 314
sebagomez
  • 9,501
  • 7
  • 51
  • 89

2 Answers2

6

As far as I've ever been able to find... no.

Matt Hanson
  • 3,458
  • 7
  • 40
  • 61
1

It's not the same as preprocessor warning, but in the most cases where I need a warning for the user I generate one using the ObsoleteAttribute:

<ObsoleteAttribute("You should no used this method!", False)> Sub MySub() End Sub

However, since it is not the same as a preprocessor warning it will only trigger if someone uses the methode.

bitlischieber
  • 77
  • 1
  • 7