I have the following method
/// <summary>
/// Replaces SemiColons with commas because SMTP client does not accept semi colons
/// </summary>
/// <param name="emailAddresses"></param>
public static List<string> ReplaceSemiColon(List<string> emailAddresses) // Note only one string in the list...
{
foreach (string email in emailAddresses)
{
email.Replace(";", ",");
}
//emailAddresses.Select(x => x.Replace(";", ",")); // Not working either
return emailAddresses;
}
However the email string is not replacing the ";" with the ",". What am I missing?