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
Casper Hansen
NA
14
0
Saving text manipulated data
May 2 2008 11:13 PM
Hello.
I have a small question/problem.
I have this text file:
// Test
0
0 0 0 15 15 7 // 0
end
1
1 1 30 25 25 240 240 -1 5 // 1
end
I read it into an array in C#, but in my array I read it in as
0 0 0 15 15 7 // 0
1 1 30 25 25 240 240 -1 5 // 1
Since this is a easyer way of manipulating with the data, but now I want to save the data to the text file.
I know the line number of my array, but that does not add up with the orginal file since I stripped som things
So my question is: How do I save the manipulated data so it fits with the orginal data?
My code looks like this:
string[] SaveMonsterLines = File.ReadAllLines(XMLfileLocation);
SaveMonsterLines[linenumber] = "1 1 30 25 25 240 240 -1 5 // 1";
File.WriteAllLines(@"D:/output.txt", SaveMonsterLines);
If you dont understand my question/problem, please speak up :)
Reply
Answers (
1
)
Collection of objects of multiple types which implement an interface.
Additional code in a C# setup project