System.Extensions.ToInt C# (CSharp) Method

ToInt() public static method

public static ToInt ( this anObject ) : int
anObject this
return int
        public static int ToInt(this object anObject)
        {
            int ret = 0;
            try { ret = Convert.ToInt32(anObject); }
            catch (Exception) { }
            return ret;
        }