字符串按其中包含的数字排序
        List L = new List();
        L.Add("第9周监测");
        L.Add("第2周监测");
        L.Add("第13周监测");
        L.Add("第16周监测");
        L.Add("第19周监测");
        L.Add("期末考试");
        L.Add("第11周监测");
        L.Add("第20周监测");

       
        L=L.OrderBy(p => int.Parse(Regex.Match(p, @"\d{1,3}").Value == "" ? "0" : Regex.Match(p, @"\d{1,3}").Value)).ToList();

        for (int i = 0; i < L.Count; i++) {
            Console.WriteLine(L[i]);
        }

        Console.ReadLine();
[附件下载]
访客: