Пример #1
0
 /// <summary>
 /// IEnumerable转换为List'T'
 /// </summary>
 /// <typeparam name="T">参数</typeparam>
 /// <param name="source">数据源</param>
 /// <returns></returns>
 public static List <T> CastToList <T>(this IEnumerable source)
 {
     return(new List <T>(source.Cast <T>()));
 }