C# Class DevUtils.PrimitivesExtensions.BoolExtensions

Static bool extension
ファイルを表示 Open project: jornfilho/.net-Dev-Utils

Public Methods

Method Description
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

Method Details

IsValidBool() public static method

Test if string value is a valid boolean value
public static IsValidBool ( this strValue ) : bool
strValue this string value
return bool

TryParseBool() public static method

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
return bool

TryParseBool() public static method

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
return bool

TryParseBoolArray() public static method

Parse string array in bool array
public static TryParseBoolArray ( this strValue ) : bool[]
strValue this string to parse
return bool[]

TryParseBoolArray() public static method

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
return bool[]

TryParseBoolArray() public static method

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
return bool[]