Remove all blank elements from List

Hi, what is the method to remove all blank elements e.g. “”, " ", " " from a list?

1 Like

@DEATHFISH Check this Expression :

list1.Where(Function(x) Not(String.IsNullOrEmpty(x) or String.IsNullOrWhiteSpace(x))).toList()
2 Likes

You can use this method “Remove”. The parameter is string, so…

This way, will remove all the blank elements from list.