Equivelent #define in vb.net?
#1

Whats the equivelent of #define in visual basic 2010?
Reply
#2

#Const <constant> = <value>
Reply
#3

Quote:
Originally Posted by Kikito
Посмотреть сообщение
#Const <constant> = <value>
It ain't, I've tried that, and it won't work.
Reply
#4

http://msdn.microsoft.com/en-us/library/zb8fth98.aspx

Off-topic: I like your avatar
Reply
#5

http://msdn.microsoft.com/en-us/library/zb8fth98.aspx

Just use

class classname
{
public const int hello = 5;
}

Then use

classname.hello

edit: oh vb.net, i think is

Dim Const hello As Integer = 5

See the url for more info
Reply
#6

There is no equivalent of #define in VB. In fact, C/C++ doesn't have #define directives as flexible as Pawn.

There are similar ways - ****** "visual basic macros" and you might find some info on that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)