Home > Net >  C # the use of "byte [] WriteData=File. ReadAllBytes (fileName);" The question?
C # the use of "byte [] WriteData=File. ReadAllBytes (fileName);" The question?

Time:09-23

The byte [] WriteData=https://bbs.csdn.net/topics/File.ReadAllBytes (fileName); When used alone is a written documents. Dat file, inside is 01 code, which is I want to write the 01 code, but set a breakpoint, the author found out that WriteData is 01 code and file line feed and carriage returns the ASCII value of the
For example, one byte is in the my documents: 01001101
But to set breakpoints observed after 48 49 WriteData is 48 48 and 49 48 49

CodePudding user response:

When you write is to use string coding "01"? It is not surprising

CodePudding user response:

reference 1st floor rocmemory response:
when you write is to use string coding "01"? It is not surprising that the

Should want to do, so how to fix it?

CodePudding user response:

reference 1st floor rocmemory response:
when you write is to use string coding "01"? It is not surprising that the

Excuse me is binary editor I want should get?

CodePudding user response:

Please help everybody!

CodePudding user response:

Byte [] WriteData=https://bbs.csdn.net/topics/File.ReadAllBytes (fileName);
So read, write, in turn, to go.
File. WriteAllBytes (WriteData);

CodePudding user response:

"01" is 48,49 {}, if don't understand this, please to the first class to learn the computer, and then after 2 years to programming,

If you start principle, then you will be easier, so to formal learning, or even in the accepted social "training" can also be difficult to become useful,

CodePudding user response:

Is to write ASCII conversion, such as ASCII value 0 decimal display is 48, 1 is 49, sequentially, the building Lord at that time I didn't think it is not a big deal

CodePudding user response:

Winhex/ultraiso, etc. To edit your dat, input 01 01 01, then you can see the effect
  •  Tags:  
  • C#
  • Related