This cide is meant to take the text from a rich text box (that is a list of users separated by commas) and then write each entry on its own line.
However, it does not. What have I done wrong?
if (chkWhiteList.Checked)
{
string rawUser = rtboxWhiteList.Text;
string[] list = rawUser.Split(new char[] { ',' });
foreach (string user in list)
{
using (StreamWriter whiteList = new StreamWriter(cleanDir + @"\white-list.txt"))
{
whiteList.WriteLine(String.Format("{0}\r\n", user));
}
}
}
try this….