I have array something like this
string[] arr = ['a', '', 'c', 'f', ''];
I want to remove null elements from the same.
How can I remove the required elements in C#?
string[] notNullStrings = arr.Where(it => !string.IsNullOrEmpty(it)).ToArray(); .Where(!string.IsNullOrEmpty) but i'm not at a computer where I can test this
charis a value type, so the closest you could do is theNULcharacter,\0. It's great when users post questions about code that won't even compile.