C# Class DevUtils.PrimitivesExtensions.BoolExtensions

Static bool extension
Afficher le fichier Open project: jornfilho/.net-Dev-Utils

Méthodes publiques

Méthode 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 méthode

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

TryParseBool() public static méthode

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
Résultat bool

TryParseBool() public static méthode

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
Résultat bool

TryParseBoolArray() public static méthode

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

TryParseBoolArray() public static méthode

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
Résultat bool[]

TryParseBoolArray() public static méthode

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
Résultat bool[]