日期:2014-05-18 浏览次数:20550 次
using System;
using System.Collections.Generic;
namespace ConsoleApplication11
{
    class Program
    {
       
        public static void Main()
        {
            List<List<string>> l = new List<List<string>>();
            List<string> ll = new List<string>();
            ll.Add("aa");
            ll.Add("bb");
            l.Add(ll);
            foreach (List<string> lll in l)
            {
                foreach (string str in lll)
                {
                    Console.WriteLine(str);
                }
            }
            Console.Read();
        } 
        
    }
}
------解决方案--------------------
up
------解决方案--------------------
实际就是2维数组
------解决方案--------------------
using System;
using System.Collections.Generic;
namespace ConsoleApplication11
{
    class Program
    {
       
        public static void Main()
        {
            List<List<string>> l = new List<List<string>>();
            List<string> ll = new List<string>();
            ll.Add("aa");
            ll.Add("bb");
            l.Add(ll);
            foreach (List<string> lll in l)
            {
                foreach (string str in lll)
                {
                    Console.WriteLine(str);
                }
            }
            Console.Read();
        } 
        
    }
}
------解决方案--------------------