/// <summary> /// Returns the integer representation of the string. Blank strings and null return 0. /// </summary> /// <param name="_string">The string to convert.</param> ///<param name="defaultValue">The default value to return if the conversion fails.</param> /// <returns>The integer value of the string.</returns> public static int ToInt(this string _string, int defaultValue) { return(StringConverters._ToInt(_string, true, defaultValue)); }
/// <summary> /// Returns the integer representation of the string. Blank strings and null return 0. /// </summary> /// <param name="_string">The string to convert.</param> /// <returns>The integer value of the string.</returns> public static int ToInt(this string _string) { return(StringConverters._ToInt(_string, false, 0)); }