Sto riscontrando qualche problema nella scrittura di una stringa delimitata da tabulazioni in un file txt.Scrittura scheda delimitato da file txt da C# .net
//This is the result I want:
First line. Second line. nThird line.
//But I'm getting this:
First line./tSecond line./tThird line.
Qui di seguito è il mio codice in cui passo la stringa da scrivere nel file txt:
string word1 = "FirstLine.";
string word2 = "SecondLine.";
string word3 = "ThirdLine.";
string line = word1 + "/t" + word2 + "/t" + word3;
System.IO.StreamWriter file = new System.IO.StreamWriter(fileName, true);
file.WriteLine(line);
file.Close();
No .. utilizzare "\ t". "\\ t" sfugge alla barra ... –
@EricJ., assolutamente giusto. Non so cosa stavo pensando – Habib