internal static Version ParseVersion(string key, string value)
            {
                Version tmp;

                if (!VersionExtensions.TryParse(value, out tmp))
                {
                    throw new ArgumentOutOfRangeException("Keyword '" + key + "' requires a version value");
                }
                return(tmp);
            }
Ejemplo n.º 2
0
        public static bool TryParse(string input, out Version result)
        {
#if NET35
            result = default(Version);
            try
            {
                var version = new Version(input);

                result = version;
            }
            catch
            {
                return(false);
            }

            return(true);
#else
            return(VersionExtensions.TryParse(input, out result));
#endif
        }