work hard work smart

专注于Java后端开发。 不断总结,举一反三。
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年6月18日

摘要: 调整数据列表内的顺序,现写成扩展方法工具类 public static class CollectionHelper { //交换List项的顺序 public static bool ExchangeOrder<T>(this IList<T> list, int sourceID, int newID) { if (sourceID >= list.Count || sourceID < 0 || newID >= list.Count || newID < 0 || sourceID == newID) retu... 阅读全文

posted @ 2012-06-18 12:10 work hard work smart 阅读(637) 评论(0) 推荐(0) 编辑