BitmapReader.Extensions.StringExtensions.ToInt C# (CSharp) Method

ToInt() public static method

public static ToInt ( this str, int defVal ) : int
str this
defVal int
return int
        public static int ToInt(this string str, int defVal = 0)
        {
            int res;
            return int.TryParse(str, out res) ? res : defVal;
        }