AGENT.Contrib.Util.Parse.TryParseLong C# (CSharp) Метод

TryParseLong() публичный статический Метод

Attempt to parse the provided string value.
public static TryParseLong ( string s, long &i ) : bool
s string String value to be parsed
i long Variable to set successfully parsed value to
Результат bool
        public static bool TryParseLong(string s, out long i)
        {
            i = 0;
            try
            {
                i = long.Parse(s);
                return true;
            }
            catch
            {
                return false;
            }
        }