hie
i just want to know if someone can give me an exemple of how toreplace a data from a single data in a textfile .
i read that i need to use a temporary textfile but i still dont get it
thanks by advance
jerome2467
0
Newbie Poster
Recommended Answers
Jump to PostWhat kind of data do you have, and what to replace?
thx for the answer.
Jump to PostString strFile = File.ReadAllText("c:\\File1.txt"); strFile = strFile.Replace("oldvalue", "newvalue"); File.WriteAllText("c:\\File1.txt", strFile);
All 5 Replies
jerome2467
0
Newbie Poster
Mitja Bonca
557
Nearly a Posting Maven
jerome2467
0
Newbie Poster
Mitja Bonca
557
Nearly a Posting Maven
jerome2467
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.