获取字符串的最后的几个字符

string id = Request["code"];
                if (!string.IsNullOrEmpty(id))
                {
                    if (id.Length > 4)
                    {
                        string[] b = id.Split(',');
                        id = (b[b.GetUpperBound(b.Rank - 1)]);
                    }
                    return id;
                }

posted @ 2011-08-09 10:47  小女阿媚  阅读(203)  评论(0编辑  收藏  举报