C# Class DevUtils.PrimitivesExtensions.IntExtensions

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

Public Methods

Method Description
IsValidInt ( this strValue ) : bool

Test if string value is a valid int value

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

Test if string value is a valid int value

TryParseInt ( this strValue ) : int

Convert string value to int value

TryParseInt ( this strValue, NumberStyles numberStyle, CultureInfo culture ) : int

Convert string value to int value

TryParseInt ( this strValue, int defaultValue ) : int

Convert string value to int value

TryParseInt ( this strValue, int defaultValue, NumberStyles numberStyle, CultureInfo culture ) : int

Convert string value to int value

TryParseInt ( this strValue, int defaultValue, bool allowZero ) : int

Convert string value to int value

TryParseInt ( this strValue, int defaultValue, bool allowZero, NumberStyles numberStyle, CultureInfo culture ) : int

Convert string value to int value

TryParseIntArray ( this strValue ) : int[]

Parse string array in short int

TryParseIntArray ( this strValue, NumberStyles numberStyle, CultureInfo culture ) : int[]

Parse string array in int array

TryParseIntArray ( this strValue, int defaultValue ) : int[]

Parse string array in int array

TryParseIntArray ( this strValue, int defaultValue, NumberStyles numberStyle, CultureInfo culture ) : int[]

Parse string array in int array

TryParseIntArray ( this strValue, int defaultValue, bool allowDefaultConversion ) : int[]

Parse string array in int array

TryParseIntArray ( this strValue, int defaultValue, bool allowDefaultConversion, NumberStyles numberStyle, CultureInfo culture ) : int[]

Parse string array in int array

Method Details

IsValidInt() public static method

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

IsValidInt() public static method

Test if string value is a valid int value
public static IsValidInt ( 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

TryParseInt() public static method

Convert string value to int value
public static TryParseInt ( this strValue ) : int
strValue this string value to convert
return int

TryParseInt() public static method

Convert string value to int value
public static TryParseInt ( this strValue, NumberStyles numberStyle, CultureInfo culture ) : int
strValue this string value to convert
numberStyle NumberStyles string number style
culture System.Globalization.CultureInfo current culture
return int

TryParseInt() public static method

Convert string value to int value
public static TryParseInt ( this strValue, int defaultValue ) : int
strValue this string value to convert
defaultValue int default value when error on convert value
return int

TryParseInt() public static method

Convert string value to int value
public static TryParseInt ( this strValue, int defaultValue, NumberStyles numberStyle, CultureInfo culture ) : int
strValue this string value to convert
defaultValue int default value when error on convert value
numberStyle NumberStyles string number style
culture System.Globalization.CultureInfo current culture
return int

TryParseInt() public static method

Convert string value to int value
public static TryParseInt ( this strValue, int defaultValue, bool allowZero ) : int
strValue this string value to convert
defaultValue int default value when error on convert value
allowZero bool allow zero on convert
return int

TryParseInt() public static method

Convert string value to int value
public static TryParseInt ( this strValue, int defaultValue, bool allowZero, NumberStyles numberStyle, CultureInfo culture ) : int
strValue this string value to convert
defaultValue int default value when error on convert value
allowZero bool allow zero on convert
numberStyle NumberStyles string number style
culture System.Globalization.CultureInfo current culture
return int

TryParseIntArray() public static method

Parse string array in short int
public static TryParseIntArray ( this strValue ) : int[]
strValue this string to parse
return int[]

TryParseIntArray() public static method

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

TryParseIntArray() public static method

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

TryParseIntArray() public static method

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

TryParseIntArray() public static method

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

TryParseIntArray() public static method

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