Hi, i have a list of strings as follows:
{
“”,
“123sds”,
" ",
“”,
“213213”,
" "
}
I want remove items “” or " ", please help me solve correct.
Thank so much.
1 Like
Hi,
Can you try the following?
listString = listString.Where(function(x) x.trim<>"").ToList
Regards,
2 Likes
i not understand what is it mean?
Hi,
It’s anonymous function.
It evaluates if the trimed content is not empty string. (If empty string, the item is removed by where method)
Regards,
1 Like
Can you give me a example for it
1 Like
It’s only remove empty String and not remove the Strings all space.
Hi,
Can you share your data as a file or text?
It’s also Ok if your xaml file.
Regards,
thanks you so much, it’s work for me.
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.