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 -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -