I have a program where a user can select email addresses in a grid and type them into a textbox. They come in delimited by a semi colon. I split on the semi colon, then union the lists to get an array containing both of the arrays' email addresses. This works, but if one of the strings starts out empty, I get a blank array entry. How can I do the same thing, but ignore empty strings?
string tmpCombinedListOfEmailAddresses = inputModel.emailAddresses.Split(';');
var emailToAddressesWriteInArray = inputModel.emailAddressesWritein.Split(';');
string tmpCombinedArrayOfString = tmpCombinedListOfEmailAddresses.Union(emailToAddressesWriteInArray).ToArray();