StringExtensions.ToBoolean method

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Strings.Extensions
Assembly Skybrud.Essentials.dll

ToBoolean(string)

Extension method

Converts str into an instance of bool . The input string is considered true if it matches either true, 1, t or on (case insensitive).

public static bool ToBoolean(this string str)

Parameters

str String

The string to be parsed.

Returns

true if str matches either true, 1, t or on (case insensitive).