Click here to Skip to main content
Click here to Skip to main content

Parsing Strings to Boolean

, 16 Sep 2010 CPOL
If you don't need to check for other strings than True or False, then, you should use Boolean.Parse or Boolean.TryParse.// Return trueBoolean.Parse("true");// Return falseBoolean.Parse("false");// Exception.. you can prevent that from happening by using a try..catch// or using...
This is an old version of the currently published tip/trick.

This article is still being written and is not currently available for general viewing.

Please go to the Programming Tips Table of Contents to view the list of available articles in this section.
| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.141223.1 | Last Updated 16 Sep 2010
Article Copyright 2010 by Simon Dufour
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid