Hi,

I need to use a lot of define constants for varios settings in my
application.

If I insert a constant in Project Configuration Properties - Build - Custom
constants, this constant is known in all modules. But if I insert #const in
any module, then I can use this constant ONLY in this module.

Does any eventuality exist to have a lot of constants, which are known in
all modules? Some statement (#LINK or #INCLUDE) for special file with
constants.

Viki

Re: #if and define constants in VB.NET by Daniel

Daniel
Thu Nov 11 09:23:19 CST 2004

I don' think so. In code per file, project properties for all files or
command line (which I have not tried with CF):
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcn7/html/vacondeclaringconditionalcompilationconstants.asp

My suggestion is you stick with the project properties for project-wide
constants simply because this way you can easily change their value per
project configuration (debug, release etc)

Cheers
Daniel
--
http://www.danielmoth.com/Blog/


"Viki" <vikil@centrum.cz> wrote in message
news:eB$FnX$xEHA.3168@TK2MSFTNGP15.phx.gbl...
> Hi,
>
> I need to use a lot of define constants for varios settings in my
> application.
>
> If I insert a constant in Project Configuration Properties - Build -
> Custom
> constants, this constant is known in all modules. But if I insert #const
> in
> any module, then I can use this constant ONLY in this module.
>
> Does any eventuality exist to have a lot of constants, which are known
> in
> all modules? Some statement (#LINK or #INCLUDE) for special file with
> constants.
>
> Viki
>
>
>