SuperMap.WindowsPhone.Core.GeoPointConverter.convertFromString C# (CSharp) Method

convertFromString() private static method

private static convertFromString ( string text ) : object
text string
return object
        private static object convertFromString(string text)
        {
            if (string.IsNullOrEmpty(text))
            {
                return null;
            }
            string str = text.Trim();
            if (str.Length == 0)
            {
                return null;
            }
            CultureInfo invariantCulture = CultureInfo.InvariantCulture;
            char ch = invariantCulture.TextInfo.ListSeparator[0];
            string[] strArray = str.Split(new char[] { ch });
            double[] numArray = new double[strArray.Length];
            for (int i = 0; i < strArray.Length; i++)
            {
                numArray[i] = double.Parse(strArray[i], invariantCulture);
            }
            if (numArray.Length != 2)
            {
                //TODO:资源
                //throw new ArgumentException("Text Parse Failed", "X,Y");
                throw new ArgumentException(ExceptionStrings.ParseFailed, "text");
            }
            return new GeoPoint { X = numArray[0], Y = numArray[1] };
        }
        /// <summary>${WP_core_GeoPointConverter_method_ConvertTo_D}</summary>