示例#1
0
        /// <summary>
        /// Convert Array to PairCollection
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="obj"></param>
        /// <returns></returns>
        public static PairCollection ToPairCollection <T>(this IEnumerable <T> obj) where T : class
        {
            var pp = new PairCollection();

            foreach (var o in obj)
            {
                pp.Add(ToPair(o));
            }
            return(pp);
        }
示例#2
0
 public static string PairModel(this DataTable dt)
 {
     using (PairCollection pc = new PairCollection(dt)) return(pc.Serialize());
 }