TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
will he
NA
14
0
How to update a record of a txt file in C# ?
Oct 3 2006 3:55 PM
Hi,
Is it possible to update a record of a txt file in C#? In VB, we can do:
Open inFile For Random As #1 Len = 1156
Put #1 , recNum, outLine
Close #1
Here recNum is the specific record number which we want to update, outLine is the new record.
My question is that in C# do we have any way to do it or not? Or C# have any other way to update a record just like update in DB file.
So far, I can figure out a way is to write all the records from beginning to recNum -1, then write record recNum and then write the balance. finianlly delete the old file and rename the new file. This is very dummy way. I hope somebody can give me a better ideal.
Thanks you very much.
Reply
Answers (
1
)
How to returns a value from stored procedure in ASP.NET
Grouping Array of Objects by Properties