Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

string to boolean is not valid Error

Hey everyone,

So I'm having this one issue with my vb.net application. It will work and run but for some reason I keep getting this error that says "" string to Boolean is not valid .

I've done some research and get what's happening but the problem is I can't find where the error is occurring there are plenty of strings and Boolean . The error does not classify exactly where it is. So my question is does anyone have any expirencing in finding where the error is or maybe some handy tips?

Thanks in advance
It just tells you, that you cannot convert your empty string to a boolean value. I bet your string has to be either "true" or "false" if you wanna convert it to boolean?
You cannot convert the string "" to a boolean because it doesn't mean anything.
PHP Code

<?php 
Try
    
'' Code here.
Catch 
ex As Exception
    MessageBox
.Show(ex.ToString, ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try 

You will get the line, I do recommend creating an error logging sub instead of messageboxes though.


(Sep 2, 2016 12:53 PM)VmX5 Wrote:  You cannot convert the string "" to a boolean because it doesn't mean anything.

I personally believe that an empty string should return false when checked as a boolean, but fuck me right?
[Image: vjPWhyy.gif]
(Sep 2, 2016 01:26 PM)$lick Wrote:  I personally believe that an empty string should return false when checked as a boolean, but fuck me right?

Lol don't get me wrong, I agree with you. It would make much more sense and would be very helpful. But what I meant is it's currently not how it is.
(Sep 2, 2016 01:44 PM)VmX5 Wrote:  Lol don't get me wrong, I agree with you. It would make much more sense and would be very helpful. But what I meant is it's currently not how it is.

Yeah I know, I was just making a statement on my current beliefs of how I think such a situation should have been handled, no hate for you.

PHP uses such a system and it's super useful for checking empty parameters and such.
[Image: vjPWhyy.gif]
Thank you everyone for the help, after all this digging through code etc I did I found it to be that it was the themes tick box causing the issue. It wasn't corresponding with the code properly but everything is now working. Thanks again


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by MankOct 4, 2020 07:53 PM 3 147 Oct 4, 2020 07:53 PM
Last Post: Mank
[C] by MordiciaNov 15, 2019 07:21 PM 3 211 Nov 15, 2019 07:21 PM
Last Post: Mordicia
[C] by ThePoliticianNov 20, 2018 10:44 AM 7 181 Nov 20, 2018 10:44 AM
Last Post: iTHX