M
Miro
Instead of having Public Variables all over my code, I have decided to make
a class called "CONSTANT"
and move them all into it.
Public Class Constants
Private Const strMiro = "MIRO" ' This example Works
Private Const boolInDebugMode As Boolean =
System.Diagnostics.Debugger.IsAttached() 'Gets error
The error I get is that it underlines the
System.Diagnostics.Debugger.IsAttached() with a blue line and says
"constant expression is required". I cant seem to find how to fix this in
google nor msdn.
I have that variable, cause i want certain things to happen when I am
running my app thru the debugger vs, running
the exe when it is in "release" mode. So this way I can do a quick If Else
Endif statement to do certain things.
-Unless there is an easier way ?
Thanks,
Miro
a class called "CONSTANT"
and move them all into it.
Public Class Constants
Private Const strMiro = "MIRO" ' This example Works
Private Const boolInDebugMode As Boolean =
System.Diagnostics.Debugger.IsAttached() 'Gets error
The error I get is that it underlines the
System.Diagnostics.Debugger.IsAttached() with a blue line and says
"constant expression is required". I cant seem to find how to fix this in
google nor msdn.
I have that variable, cause i want certain things to happen when I am
running my app thru the debugger vs, running
the exe when it is in "release" mode. So this way I can do a quick If Else
Endif statement to do certain things.
-Unless there is an easier way ?
Thanks,
Miro