ApiExamples.CustomBarcodeGenerator.TryParseInt C# (CSharp) Метод

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

Parses an integer using the invariant culture. Returns Int.MinValue if cannot parse. Allows leading sign. Allows leading and trailing spaces.
public static TryParseInt ( string s ) : int
s string
Результат int
        public static int TryParseInt(string s)
        {
            double temp;
            return (Double.TryParse(s, NumberStyles.Integer, CultureInfo.InvariantCulture, out temp)) ? CastDoubleToInt(temp) : int.MinValue;
        }