コード例 #1
0
        public static int GetVersionNumber(string _serverName)
        {
            List <int> tempNumberList = new List <int>();

            string tempBuff = NetworkRequest.GetWebBuff(BuildConst.UploadServerPath + _serverName + "/" + BuildConst.VersionFile);

            string[] tempBuffs = tempBuff.Split('#');

            for (int i = 0; i < tempBuffs.Length; i++)
            {
                int    tempIndex  = 0;
                string tempNumber = tempBuffs[i].Split('_')[0];
                if (int.TryParse(tempNumber, out tempIndex))
                {
                    tempNumberList.Add(tempIndex);
                }
            }

            if (tempNumberList.Count == 0)
            {
                return(9999);
            }

            tempNumberList.Sort();
            return(tempNumberList[tempNumberList.Count - 1]);
        }