It might be handier than going through the project properties to set the
constant, but if you set it in the properties, you can specify different
values for different build configurations (e.g. DEBUG only exists in the
debug configuration, not the release configuration.
"Crirus" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Found a better way
>
> #const MyConst=True
>
> .
> .
> .
> #If MyConst Then
>
> conditional code here
>
> #EndIf
>
> --
> Cheers,
> Crirus
>
> ------------------------------
> If work were a good thing, the boss would take it all from you
>
> ------------------------------
>
> "Codemonkey" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > You can use the built in Debug constant to test when compiled in to
debug
> > mode instead of release mode.
> >
> > E.g.
> >
> > #If DEBUG Then
> >
> > 'Do debugging code
> >
> > #End If
> >
> > If you need to define your own constant, go to the project properties ->
> > Configuration Properties -> Build and insert any custom constants you
need
> > at the bottom of the page.
> >
> > Hope this helps.
> >
> > Trev.
> >
> > "Crirus" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > I need a code to be considered only when I test something...
> > > How to declare a compile constant..?
> > >
> > > --
> > > Cheers,
> > > Crirus
> > >
> > > ------------------------------
> > > If work were a good thing, the boss would take it all from you
> > >
> > > ------------------------------
> > >
> > >
> >
> >
>
>
|