我如何定义一个动态数组在C#?
How can I define a dynamic array in C#?
C#不提供动态数组。相反,它提供了其工作方式相同List类。
C# doesn't provide dynamic arrays. Instead, it offers List class which works the same way.
要使用列表,写在你的文件的顶部:
To use lists, write at the top of your file:
using System.Collections.Generic;
和您要使用清单,写(例如对于字符串):
And where you want to make use of a list, write (example for strings):
List<string> mylist = new List<string>();
mylist.Add("First string in list");
上一篇:FlipAnimation导致问题4.4.3问题、FlipAnimation
下一篇:是StaticFactory&LT; T&GT;在$ C ccampserver一个众所周知的模式$?众所周知、模式、LT、StaticFactory