日期:2014-05-17  浏览次数:20467 次

List<string>排序问题
 现有一个需求,需要对List<string>里面的Ip进行排序,
例如,集合是这样的:
 List<string> IpList = new List<string>() {
            "172.16.88.220"
             +"222.73.29.77"
             +"192.168.1.8"
             +"172.16.88.2"
             +"192.168.1.7"
             +"172.16.88.10"
             +"172.16.88.3"
             +"172.16.88.8"
             +"172.16.88.225"
             +"172.16.88.100"
             +"221.130.187.180"
             +"221.130.187.181"
             +"222.73.55.168"
             +"172.16.88.7"
             +"222.73.29.79"
             +"172.16.88.200"
             +"172.16.88.125"
             +"192.168.1.1"
             +"222.73.55.250"
             +"115.236.102.216"
             +"172.17.22.161"
             +"222.73.29.135"
             +"222.73.29.136"
             +"172.17.22.162"
             +"172.16.88.9"
             +"115.238.26.184"
             +"115.238.26.185"
             +"115.238.26.186"
        };