Search
 
SCRIPT & CODE EXAMPLE
 

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();
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# switch expression 8.0 
Csharp :: c# string size in bytes 
Csharp :: keep sprites at fixed transform according to screen resolution unity 
Csharp :: tulpep notification window example c# 
Csharp :: return every digit on a string c# 
Csharp :: id dublication exception c# .net core 
Csharp :: how to pass object as test case in nunit c# 
Csharp :: c# if a new program is started 
Csharp :: get higest number in MVC 
Csharp :: creating weighted graph in c# 
Csharp :: reversing linkedlist C# 
Csharp :: dotween do rotate on one axis 
Csharp :: Options Pattern how to use 
Csharp :: user input in c# 
Csharp :: ExceptionFilterAttribute exception-handler-middleware-not-catching 
Csharp :: how to add a round image unity 
Csharp :: c# use list as a paramter 
Csharp :: set data annotation in model c# 
Csharp :: assign a list to another in c# without a loop 
Csharp :: there is no renderer attached to the gameobject 
Csharp :: c# plus one 
Csharp :: wpf open new Window in MVVM 
Csharp :: how to play a random sound at the position that you want in unity 
Csharp :: Smooth Sentences c# 
Csharp :: how to get the size of an array in c# 
Csharp :: page refresh on button click in c# 
Csharp :: unity c# rate game 
Csharp :: populate combobox from array c# 
Csharp :: C# Bitwise and Bit Shift operator 
Csharp :: read administrator account remote machine C# 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =