Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

#warning directive in VB.net

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.

like image 968
sebagomez Avatar asked Oct 10 '08 19:10

sebagomez


2 Answers

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

like image 180
Matt Hanson Avatar answered Nov 03 '22 17:11

Matt Hanson


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.

like image 1
bitlischieber Avatar answered Nov 03 '22 18:11

bitlischieber