C# Class DevUtils.PrimitivesExtensions.ByteExtensions

Static byte extension
Show file Open project: jornfilho/.net-Dev-Utils

Public Methods

Method Description
IsValidByte ( this strValue ) : bool

Test if string value is a valid byte value

IsValidByte ( this strValue, NumberStyles numberStyle, CultureInfo culture ) : bool

Test if string value is a valid byte value

TryParseByte ( this strValue ) : byte

Convert string byte value to byte value

TryParseByte ( this strValue, NumberStyles numberStyle, CultureInfo culture ) : byte

Convert string byte value to byte value

TryParseByte ( this strValue, byte defaultValue ) : byte

Convert string byte value to byte value

Set default value on invalid convertion

TryParseByte ( this strValue, byte defaultValue, NumberStyles numberStyle, CultureInfo culture ) : byte

Convert string byte value to byte value

Set default value on invalid convertion

TryParseByte ( this strValue, byte defaultValue, bool allowZero ) : byte

Convert string byte value to byte value

Set default value on invalid convertion

Allow 0 as converted value flag

TryParseByte ( this strValue, byte defaultValue, bool allowZero, NumberStyles numberStyle, CultureInfo culture ) : byte

Convert string byte value to byte value

Set default value on invalid convertion

Allow 0 as converted value flag

TryParseByteArray ( this strValue ) : byte[]

Parse string array in byte array

TryParseByteArray ( this strValue, NumberStyles numberStyle, CultureInfo culture ) : byte[]

Parse string array in byte array

TryParseByteArray ( this strValue, byte defaultValue ) : byte[]

Parse string array in byte array

TryParseByteArray ( this strValue, byte defaultValue, NumberStyles numberStyle, CultureInfo culture ) : byte[]

Parse string array in byte array

TryParseByteArray ( this strValue, byte defaultValue, bool allowDefaultConversion ) : byte[]

Parse string array in byte array

TryParseByteArray ( this strValue, byte defaultValue, bool allowDefaultConversion, NumberStyles numberStyle, CultureInfo culture ) : byte[]

Parse string array in byte array

Method Details

IsValidByte() public static method

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

IsValidByte() public static method

Test if string value is a valid byte value
public static IsValidByte ( this strValue, NumberStyles numberStyle, CultureInfo culture ) : bool
strValue this string value
numberStyle NumberStyles number style to convert
culture System.Globalization.CultureInfo culture origin
return bool

TryParseByte() public static method

Convert string byte value to byte value
public static TryParseByte ( this strValue ) : byte
strValue this string value
return byte

TryParseByte() public static method

Convert string byte value to byte value
public static TryParseByte ( this strValue, NumberStyles numberStyle, CultureInfo culture ) : byte
strValue this string value
numberStyle NumberStyles number style to convert
culture System.Globalization.CultureInfo culture origin
return byte

TryParseByte() public static method

Convert string byte value to byte value

Set default value on invalid convertion

public static TryParseByte ( this strValue, byte defaultValue ) : byte
strValue this string value
defaultValue byte default value
return byte

TryParseByte() public static method

Convert string byte value to byte value

Set default value on invalid convertion

public static TryParseByte ( this strValue, byte defaultValue, NumberStyles numberStyle, CultureInfo culture ) : byte
strValue this string value
defaultValue byte default value
numberStyle NumberStyles number style to convert
culture System.Globalization.CultureInfo culture origin
return byte

TryParseByte() public static method

Convert string byte value to byte value

Set default value on invalid convertion

Allow 0 as converted value flag

public static TryParseByte ( this strValue, byte defaultValue, bool allowZero ) : byte
strValue this string value
defaultValue byte default value
allowZero bool Allow 0
return byte

TryParseByte() public static method

Convert string byte value to byte value

Set default value on invalid convertion

Allow 0 as converted value flag

public static TryParseByte ( this strValue, byte defaultValue, bool allowZero, NumberStyles numberStyle, CultureInfo culture ) : byte
strValue this string value
defaultValue byte default value
allowZero bool Allow 0
numberStyle NumberStyles number style to convert
culture System.Globalization.CultureInfo culture origin
return byte

TryParseByteArray() public static method

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

TryParseByteArray() public static method

Parse string array in byte array
public static TryParseByteArray ( this strValue, NumberStyles numberStyle, CultureInfo culture ) : byte[]
strValue this string to parse
numberStyle NumberStyles number style to convert
culture System.Globalization.CultureInfo culture origin
return byte[]

TryParseByteArray() public static method

Parse string array in byte array
public static TryParseByteArray ( this strValue, byte defaultValue ) : byte[]
strValue this string to parse
defaultValue byte default value when default tryparse
return byte[]

TryParseByteArray() public static method

Parse string array in byte array
public static TryParseByteArray ( this strValue, byte defaultValue, NumberStyles numberStyle, CultureInfo culture ) : byte[]
strValue this string to parse
defaultValue byte default value when default tryparse
numberStyle NumberStyles number style to convert
culture System.Globalization.CultureInfo culture origin
return byte[]

TryParseByteArray() public static method

Parse string array in byte array
public static TryParseByteArray ( this strValue, byte defaultValue, bool allowDefaultConversion ) : byte[]
strValue this string to parse
defaultValue byte default value when default tryparse
allowDefaultConversion bool Allow default tryparse values
return byte[]

TryParseByteArray() public static method

Parse string array in byte array
public static TryParseByteArray ( this strValue, byte defaultValue, bool allowDefaultConversion, NumberStyles numberStyle, CultureInfo culture ) : byte[]
strValue this string to parse
defaultValue byte default value when default tryparse
allowDefaultConversion bool Allow default tryparse values
numberStyle NumberStyles number style to convert
culture System.Globalization.CultureInfo culture origin
return byte[]