Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

C# extend array

string[] items = new string[3] { "input1", "input2", "input3" };
string[] moreItems = new string[10] { "input4", "input5" };

// array to list
List<string> itemsList = items.ToList<string>();

itemsList.Add("newItem");
// or merge an other array to the list
itemsList.AddRange(moreItems);

// list to array
string[] newArray = itemsList.ToArray();
 
PREVIOUS NEXT
Tagged: #extend #array
ADD COMMENT
Topic
Name
6+9 =