read Text File and Make Changes c# -


i want read text file contains

<customername>@coustomername</coustomername> <customeraddress>@customeraddress</customeraddress> <customermobileno>@customermobileno</customermobileno> <payment>@payment</payment> 

replace @coustomername coustomer name passes during run time

till use

string readfile = file.readalltext(path); regex.replace(readfile , "@coustomername ", objproposar.firstname); 

this works need make changes in coustomer address, mobile no etc how can

why regex, simple string.replace job:

string oldtext = file.readalltext(path); string newtext = oldtext.replace("@coustomername", objproposar.firstname); // other ... file.writealltext(path, newtext); 

Comments

Popular posts from this blog

c++ - list<myClass<int> * > sort -

SoapUI on windows 10 - high DPI/4K scaling issue -

java - why am i getting a "cannot resolve method" error on getApplication? -