汉字转换数字

 

 /// <summary>
        /// 转换数字
        /// </summary>
        protected static int CharToNumber(string c)
        {
            switch (c)
            {
                case "": return 1;
                case "": return 2;
                case "": return 3;
                case "": return 4;
                case "": return 5;
                case "": return 6;
                case "": return 7;
                case "": return 8;
                case "": return 9;
                case "": return 0;
                default: return int.Parse(c);
            }
        }

 

posted @ 2019-08-01 15:12  sunshuaize  阅读(244)  评论(0编辑  收藏  举报