Konu
c# txt içerisindeki satırı değiştirme ?
13-05-2019, 22:41:28
#2
Rijndael
Üyeliği durduruldu
Alıntı
static void lineChanger(string newText, string fileName, int line_to_edit) {
string[] arrLine = File.ReadAllLines(fileName);
arrLine[line_to_edit - 1] = newText;
File.WriteAllLines(fileName, arrLine);
}
Ornek :
Alıntı
lineChanger("new content for this line" , "sample.text" , 34); // 34. satir
Kaynak :
https://stackoverflow.com/questions/...ile-in-c-sharp