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

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

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