I have this:
List s = new List{\"\", \"a\", \"\", \"b\", \"\", \"c\"};
I want to remove all the empty elements
Check out with List.RemoveAll with String.IsNullOrEmpty() method;
Indicates whether the specified string is null or an Empty string.
s.RemoveAll(str => string.IsNullOrEmpty(str));
Here is a DEMO.