List<string> ts=new List<string>();
ts里有16个原素,也有可是24个,32个,反正是成倍增涨    public class test
    {
        public string test1 { get; set; }
        public string test2 { get; set; }
        public string test3 { get; set; }
        public string test4 { get; set; }
        public string test5 { get; set; }
        public string test6 { get; set; }
        public string test7 { get; set; }
        public string test8 { get; set; }
    }我想用一个
List<test> ts=new List<test>();
把ts里的每8个原素放到ts里,请怎么实现,谢谢

解决方案 »

  1.   

    用一个循环,把这些数据装到List<string>里!
      

  2.   

    using System.Collections.Generic;IList<string> d=new List<string>;
            d.Add("d");
            d.Add("v");
    //用循环液可以。
      

  3.   

    List<string> ts=new List<string>();
    ts里有16个原素,也有可是24个,32个,反正是成倍增涨     public class test
        {
            public string test1 { get; set; }
            public string test2 { get; set; }
            public string test3 { get; set; }
            public string test4 { get; set; }
            public string test5 { get; set; }
            public string test6 { get; set; }
            public string test7 { get; set; }
            public string test8 { get; set; }
        }List<test> td=new List<test>();把ts里的每8个原素放到td里,
    不会写啊
      

  4.   

    List<T> ts=new List<T>();
    T可以任意类型....用的时候把所有T都替换掉就行了,比如替换成你的类...