string[] items = new string[]
{ "", "Name1", "
Name2
", null, "
Name3
", "
Name4
", null, "
Name5
" };
Solutions :
items = items.Where(s => !String.IsNullOrEmpty(s)).ToArray();
No comments:
Post a Comment