Click or drag to resize

StringExtensionsToFlexibleBoolean Method

Uses a flexible parsing routine to convert a text value into a Boolean.

Namespace:  Autofac.Configuration.Util
Assembly:  Autofac.Configuration (in Autofac.Configuration.dll) Version: 6.0.0+ec1c6438ceb3f3338c7364e35e7303f014e3fc39
public static bool ToFlexibleBoolean(
	this string value


Type: SystemString
The value to parse into a Boolean.

Return Value

Type: Boolean
or based on the content of the value.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
InvalidOperationException Thrown if value can't be parsed into a Boolean.
See Also