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
Post a Comment