Click here to Skip to main content
15,897,273 members
Home / Discussions / C#
   

C#

 
GeneralRe: I want to modify/replace some data from a binary file without loadig the file in memory. Pin
Alex Manolescu30-Dec-09 6:56
Alex Manolescu30-Dec-09 6:56 
GeneralRe: I want to modify/replace some data from a binary file without loadig the file in memory. Pin
ProtoBytes30-Dec-09 7:07
ProtoBytes30-Dec-09 7:07 
GeneralRe: I want to modify/replace some data from a binary file without loadig the file in memory. Pin
Alex Manolescu30-Dec-09 8:27
Alex Manolescu30-Dec-09 8:27 
GeneralRe: I want to modify/replace some data from a binary file without loadig the file in memory. Pin
#realJSOP30-Dec-09 7:08
professional#realJSOP30-Dec-09 7:08 
GeneralRe: I want to modify/replace some data from a binary file without loadig the file in memory. Pin
Alex Manolescu30-Dec-09 8:29
Alex Manolescu30-Dec-09 8:29 
AnswerRe: I want to modify/replace some data from a binary file without loadig the file in memory. Pin
Luc Pattyn30-Dec-09 6:49
sitebuilderLuc Pattyn30-Dec-09 6:49 
GeneralRe: I want to modify/replace some data from a binary file without loadig the file in memory. Pin
Alex Manolescu30-Dec-09 7:00
Alex Manolescu30-Dec-09 7:00 
GeneralRe: I want to modify/replace some data from a binary file without loadig the file in memory. Pin
Luc Pattyn30-Dec-09 7:30
sitebuilderLuc Pattyn30-Dec-09 7:30 
Hi,

1.
if (br.BaseStream.Position == x) {
    // below is the data that I want to write
    bw.Write(1);
    bw.Write("StringData");
    bw.Write("StringData");
} else {
    bw.Write(b);
}


is much cleaner; performance is the same.

2.
damage to file format depends on file type. You could not do that for a Word document, an EXE file, etc.
You could do it for your own data files if your apps accept such changes.

Smile | :)

Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

Merry Christmas and a Happy New Year to all.


GeneralRe: I want to modify/replace some data from a binary file without loadig the file in memory. Pin
Alex Manolescu30-Dec-09 8:25
Alex Manolescu30-Dec-09 8:25 
AnswerRe: I want to modify/replace some data from a binary file without loadig the file in memory. Pin
petercrab30-Dec-09 17:59
petercrab30-Dec-09 17:59 
QuestionAbstracts: can I do better than this? Pin
MollyTheCoder30-Dec-09 4:45
MollyTheCoder30-Dec-09 4:45 
AnswerRe: Abstracts: can I do better than this? Pin
Luc Pattyn30-Dec-09 4:56
sitebuilderLuc Pattyn30-Dec-09 4:56 
GeneralRe: Abstracts: can I do better than this? Pin
MollyTheCoder30-Dec-09 5:22
MollyTheCoder30-Dec-09 5:22 
AnswerRe: Abstracts: can I do better than this? Pin
#realJSOP30-Dec-09 5:14
professional#realJSOP30-Dec-09 5:14 
AnswerRe: Abstracts: can I do better than this? Pin
DaveyM6930-Dec-09 5:20
professionalDaveyM6930-Dec-09 5:20 
AnswerRe: Abstracts: can I do better than this? Pin
Paulo Zemek30-Dec-09 5:23
Paulo Zemek30-Dec-09 5:23 
AnswerRe: Abstracts: can I do better than this? Pin
Eddy Vluggen30-Dec-09 6:56
professionalEddy Vluggen30-Dec-09 6:56 
AnswerRe: Abstracts: can I do better than this? [modified] Pin
PIEBALDconsult30-Dec-09 7:20
mvePIEBALDconsult30-Dec-09 7:20 
GeneralRe: Abstracts: can I do better than this? Pin
MollyTheCoder30-Dec-09 7:43
MollyTheCoder30-Dec-09 7:43 
GeneralRe: Abstracts: can I do better than this? Pin
PIEBALDconsult30-Dec-09 7:52
mvePIEBALDconsult30-Dec-09 7:52 
GeneralRe: Abstracts: can I do better than this? Pin
MollyTheCoder30-Dec-09 7:58
MollyTheCoder30-Dec-09 7:58 
GeneralRe: Abstracts: can I do better than this? Pin
pbalaga30-Dec-09 8:12
pbalaga30-Dec-09 8:12 
GeneralRe: Abstracts: can I do better than this? [modified] Pin
ProtoBytes30-Dec-09 8:35
ProtoBytes30-Dec-09 8:35 
GeneralRe: Abstracts: can I do better than this? Pin
MollyTheCoder30-Dec-09 8:36
MollyTheCoder30-Dec-09 8:36 
GeneralRe: Abstracts: can I do better than this? Pin
PIEBALDconsult5-Apr-10 15:33
mvePIEBALDconsult5-Apr-10 15:33 

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.