Click here to Skip to main content
15,887,135 members
Home / Discussions / C#
   

C#

 
AnswerRe: opening pdf file in windows application using c# Pin
Ed.Poore3-May-08 1:34
Ed.Poore3-May-08 1:34 
GeneralRe: opening pdf file in windows application using c# Pin
maruthi3-May-08 1:46
maruthi3-May-08 1:46 
QuestionHow to create new VPN Connection through C#.net Pin
Seema Gosain2-May-08 20:14
Seema Gosain2-May-08 20:14 
AnswerRe: How to create new VPN Connection through C#.net Pin
Christian Graus2-May-08 21:12
protectorChristian Graus2-May-08 21:12 
AnswerRe: How to create new VPN Connection through C#.net Pin
zeyad_aamer27-Jan-13 4:49
zeyad_aamer27-Jan-13 4:49 
Questionnot able 2 update in database Pin
sow_mj2-May-08 18:22
sow_mj2-May-08 18:22 
AnswerRe: not able 2 update in database Pin
Christian Graus2-May-08 21:10
protectorChristian Graus2-May-08 21:10 
QuestionSaving text manipulated data Pin
Casper Hansen2-May-08 17:13
Casper Hansen2-May-08 17:13 
Hello.

I have a small question/problem.

I have this text file:
// Test<br />
0<br />
0    0    0    15    15    7    // 0<br />
end<br />
<br />
1<br />
1    1    30    25    25    240    240    -1    5    // 1   <br />
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<br />
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);<br />
SaveMonsterLines[linenumber] = "1    1    30    25    25    240    240    -1    5    // 1";<br />
File.WriteAllLines(@"D:/output.txt", SaveMonsterLines);


If you dont understand my question/problem, please speak up Smile | :)
AnswerRe: Saving text manipulated data Pin
Christian Graus2-May-08 17:22
protectorChristian Graus2-May-08 17:22 
AnswerRe: Saving text manipulated data Pin
Casper Hansen3-May-08 2:37
Casper Hansen3-May-08 2:37 
AnswerRe: Saving text manipulated data Pin
Casper Hansen3-May-08 14:48
Casper Hansen3-May-08 14:48 
QuestionThreading events Pin
MarkB7772-May-08 16:56
MarkB7772-May-08 16:56 
AnswerRe: Threading events Pin
Christian Graus2-May-08 17:06
protectorChristian Graus2-May-08 17:06 
AnswerRe: Threading events Pin
Charith Jayasundara3-May-08 6:51
Charith Jayasundara3-May-08 6:51 
QuestionText bounds problem Pin
Richard Blythe2-May-08 10:47
Richard Blythe2-May-08 10:47 
AnswerRe: Text bounds problem Pin
Luc Pattyn2-May-08 12:05
sitebuilderLuc Pattyn2-May-08 12:05 
GeneralRe: Text bounds problem Pin
Richard Blythe3-May-08 4:12
Richard Blythe3-May-08 4:12 
GeneralRe: Text bounds problem Pin
Luc Pattyn3-May-08 4:31
sitebuilderLuc Pattyn3-May-08 4:31 
QuestionDynamic file reading Pin
ffowler2-May-08 9:45
ffowler2-May-08 9:45 
AnswerRe: Dynamic file reading Pin
PIEBALDconsult2-May-08 10:50
mvePIEBALDconsult2-May-08 10:50 
AnswerRe: Dynamic file reading Pin
Adeel Chaudhry2-May-08 11:13
Adeel Chaudhry2-May-08 11:13 
AnswerRe: Dynamic file reading Pin
Charith Jayasundara3-May-08 6:48
Charith Jayasundara3-May-08 6:48 
QuestionHelp with reading text files Pin
False Chicken2-May-08 9:38
False Chicken2-May-08 9:38 
AnswerRe: Help with reading text files Pin
Gareth H2-May-08 10:50
Gareth H2-May-08 10:50 
AnswerRe: Help with reading text files Pin
PIEBALDconsult2-May-08 10:52
mvePIEBALDconsult2-May-08 10:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.