I have a textBox control that lets the user their email address/addresses. The use may enter email by supplying comma or in next line (new line).
The task is to check whether the textBox contains new line (\n) character or commas then split the email addresses accordingly.
I applied:
string[] emails = txtemailAddress.Text.Split('\n');
it splits the email addresses.
I need a single routine that should check whether the textBox contains ",' {or} '\n' and
split the string based on the split character.If the email address is invalid in format it should throw exception as well.
Thanks in advance.