我想以编程方式向C#中的字符串数组添加或删除一些元素,但仍然保留以前拥有的项,有点像VB函数ReDim Preserve。
发布于 2020-08-04 23:04:41
一个线条:
string[] items = new string[] { "a", "b" };
// this adds "c" to the string array:
items = new List<string>(items) { "c" }.ToArray(); https://stackoverflow.com/questions/9570944
复制相似问题