NULLs in string array

c#, character-arrays

Solution

No, it's not possible without creating a new array. You can't resize an array.

You can easily create a new array without empty strings and null references like this:

string[] items = new string[] { "", "-2", "3", null, "-4", "+5", null, "66" };

items = items.Where(s => !String.IsNullOrEmpty(s)).ToArray();

Problem

How to remove Null values in string array Like { ,-2,3, ,-4,+5, ,66...} I need to remove those null values in between and re-size the array I don't want to use lists I don't want to create a new array Please let me know if it is possible with simple code. Thank You.

Original source