I am using the following:
return string.Join(\"\\n\", parts);
Parts has 7 entries but two of them are the empty string \"\". How can I fi
You can use Where in LINQ to select strings which are not empty:
Where
return string.Join("\n", parts.Where(s => !string.IsNullOrEmpty(s)));