kOS.Safe.Encapsulation.ScalarValue.TryParseInt C# (CSharp) Method

TryParseInt() public static method

public static TryParseInt ( string str, ScalarValue &result ) : bool
str string
result ScalarValue
return bool
        public static bool TryParseInt(string str, out ScalarValue result)
        {
            result = null; // default the out value to null
            int val;
            if (int.TryParse(str, out val))
            {
                result = new ScalarIntValue(val);
                return true;
            }
            return false;
        }