I'm making a CSV converter for this I need to replace all the spaces of my string with a ";". I've tried:
string content = tbxArret.Text;
string path = @"C:\Users\DanyWin\Desktop\CsvOutput\test.csv";
string[] space = new string[] { " " };
foreach (string contenu in content.Split(space, StringSplitOptions.RemoveEmptyEntries))
{
content.Replace(" ", ";");
File.WriteAllText(path, content);
}
But it didn't work. The text in the CSV file is just the copy of what I put in the content.
Example : a string abc ="a b c ";
should return "a;b;c;".
Any help ? :)