First, choose the language:
- the code is not basic
The principle of
foreach
is avoid having a counter thus, in the loop, you don't know when you are in last iteration.
The traditional solution is more like:
txtclients.Text = txtclients.Text + storedata[0];
for (int i=1; i< storedata.count; i++)
{
txtclients.Text = txtclients.Text + "\n" + storedata[i];
}