If you would like to return all emails, try this:
StringBuilder sb = new StringBuilder();
while (reader.Read())
{
sb.Append(reader[0].ToString() + "; ");
}
return sb.ToString();
Above code should return a list of emials separated by "
;
", for example: "
JohnDoe@g.com; JaneDoe@h.com; ...; AliBabaAnd40Robbers@z.com
"
For further details, please see:
StringBuilder Class (System.Text)[
^]