I need to convert the IEnumerable<string> emails to comma separated string.
The iEnumerable is actually Hashset<string> with emails, I need to generate string with emails separated by ','
[email protected], [email protected], [email protected]
how can I do it without using loop
You can use String.Join:
string result = String.Join(", ", emails);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With