Replace all the spaces with ";"
<p>I'm making a CSV converter for this I need to replace all the spaces of my string with a ";". I've tried:</p>

<pre><code>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);
}
</code></pre>

<p>But it didn't work. The text in the CSV file is just the copy of what I put in the content.</p>

<p>Example : a <code>string abc ="a b c ";</code> should return "a;b;c;".</p>

<p>Any help ? :)</p>