C#指定type的列表

// See https://aka.ms/new-console-template for more information
using System.Collections;

namespace Helloworld
{
    class Program
    {
        static void Main(string[] args)
        {
            var list = new List<int>();
            list.Add(1);
            list.Add(2);
            list.Add(3);
            Console.WriteLine(list[1]);
        }
    }
}

评论

发表回复