C# Класс DevUtils.PrimitivesExtensions.BoolExtensions

Static bool extension
Показать файл Открыть проект

Открытые методы

Метод Описание
IsValidBool ( this strValue ) : bool

Test if string value is a valid boolean value

TryParseBool ( this strValue ) : bool

Try parse string bool (true,false,0,1) to boolean value

Default value is false

TryParseBool ( this strValue, bool defaultValue ) : bool

Try parse string bool (true,false,0,1) to boolean value

TryParseBoolArray ( this strValue ) : bool[]

Parse string array in bool array

TryParseBoolArray ( this strValue, bool defaultValue ) : bool[]

Parse string array in bool array

TryParseBoolArray ( this strValue, bool defaultValue, bool allowDefaultConversion ) : bool[]

Parse string array in bool array

Описание методов

IsValidBool() публичный статический Метод

Test if string value is a valid boolean value
public static IsValidBool ( this strValue ) : bool
strValue this string value
Результат bool

TryParseBool() публичный статический Метод

Try parse string bool (true,false,0,1) to boolean value

Default value is false

public static TryParseBool ( this strValue ) : bool
strValue this string to convert
Результат bool

TryParseBool() публичный статический Метод

Try parse string bool (true,false,0,1) to boolean value

public static TryParseBool ( this strValue, bool defaultValue ) : bool
strValue this string to convert
defaultValue bool default return value
Результат bool

TryParseBoolArray() публичный статический Метод

Parse string array in bool array
public static TryParseBoolArray ( this strValue ) : bool[]
strValue this string to parse
Результат bool[]

TryParseBoolArray() публичный статический Метод

Parse string array in bool array
public static TryParseBoolArray ( this strValue, bool defaultValue ) : bool[]
strValue this string to parse
defaultValue bool default value when default tryparse
Результат bool[]

TryParseBoolArray() публичный статический Метод

Parse string array in bool array
public static TryParseBoolArray ( this strValue, bool defaultValue, bool allowDefaultConversion ) : bool[]
strValue this string to parse
defaultValue bool default value when default tryparse
allowDefaultConversion bool Allow default tryparse values
Результат bool[]