What's the best way to add an item to a C# array? -


i have following array:

int[] numbers; 

is there way add number array? didn't find extension method concats 2 arrays, wanted like:

numbers = numbers.concat(new[] { valuetoadd }); 

to concatenate 2 ararys at: how concatenate 2 arrays in c#?

the best solution can suggest use

list<int> numbers 

and when needed call toarray() extension method (and not opposite).


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -