using System;
using System.Collections.Generic;
public class Test
{
public static void Main()
{
List<string> myStringLists = new List<string>();
string [] x=new string[]{"1","2","3","4","5"};
for(int i=0;i<6;i++)
{
myStringLists.Add(x[i]);
}
foreach(string myStringList in myStringLists)
{
Console.WriteLine(myStringList);
}
}
}
List總數
myStringLists.Count;
沒有留言:
張貼留言