Solved

Convert string value "True" to Boolean Error

Posted on 2007-11-16
2
2,108 Views
Last Modified: 2008-02-01
Hi there,
 Please see the following code:

Dim test As String
test = "True"
Convert.ToBoolean("test ")

Do you have any idea by this is giving this error?
String was not recognized as a valid Boolean.

I thought True was a valid Boolean value?

Any help appreciated!
Regards,
Richard
0
Comment
Question by:crich
2 Comments
 
LVL 18

Accepted Solution

by:
DarrenD earned 125 total points
ID: 20297685
Hi there,


Dim test As String
test = "True"
Convert.ToBoolean(test)

No quotes!
0
 

Author Comment

by:crich
ID: 20297700
thanks!
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now