Click here to Skip to main content
Click here to Skip to main content
Alternatives (1)

Tagged as

Parsing Strings to Boolean

, 15 Sep 2010 CPOL
Handy extension method that parses common boolean expressions

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

16 Sep 2010
Simon Dufour
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...

License

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

Share

About the Author

Enrique Albert
Software Developer (Senior)
Ireland Ireland
No Biography provided
Follow on   Twitter

| | Privacy | Terms of Use | Mobile
Web03 | 2.8.141220.1 | Last Updated 15 Sep 2010
Article Copyright 2010 by Enrique Albert
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid