Click here to Skip to main content
15,867,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Does VB allow you to treat a String as an integer with out any explicit conversion between the two such as CDec... can this be due to it being built as a Debug release rather that a Release build?
Posted

Unfortunately not - this is a language "feature" which operates in release and debug builds.

And which is one of the reasons why I prefer C# - it doesn't do it, and finds problems at compile time instead of run time as a result. :sigh:
 
Share this answer
 
Comments
glennPattonWork3 25-Mar-14 7:40am    
Now I really HATE it, why, for the love of... I want to immolate the Muppet who wrote this. It work my **** it will fail I can. I'm not allowed to rewrite it. I'm in Dilbert heck
glennPattonWork3 25-Mar-14 7:54am    
Umm also Griff um switching off error catching is that possible... Could this cause it to appear to work...
OriginalGriff 25-Mar-14 8:01am    
Arggh! No! I'm going to hate my self if I tell you that!
On

Error

Resume


Next
glennPattonWork3 25-Mar-14 8:08am    
oh my <redacted> not that!, I have make mods to some code that doesn't appear to work. I was give the task of getting rid of one board and replacing it. I appear to have disturbed the pile and it won't work now!
OriginalGriff 25-Mar-14 8:14am    
Well if the code didn't work before and it doesn't work now, they can't blame you, can they? :laugh:
I guess its the default behavior. :/

You can turn that off in the Project Settings by turning on Option Strict in the Compile Tab.

If you want that behaviour depending on Debug or Release Mode, not depending on Project Settings.
add this to the beginning of your files

VB
#If DEBUG Then
     Option Strict Off
#Else
     Option Strict On
#End If

Be sure to have DEBUG-Constant enabled in enhanced Compile Options
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900