• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2136
  • Last Modified:

Convert string value "True" to Boolean Error

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
crich
Asked:
crich
1 Solution
 
DarrenDCommented:
Hi there,


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

No quotes!
0
 
crichAuthor Commented:
thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now