File Operations in C #
Many Attributes of fileinfo dir do not need to be known to everyone on earth (what filename, create () Delete ())
The file system concept is well understood.
File Reading and Writing (hard disk to memory and then to the display)
What we want to talk about is the difference between streamwriter and binarywriter.
It can be understood as follows:
Streamwriter is used to write text files.
Binary is used to write binary files.
If you use a binaryreader to read and write data using streamwriter
The next time you open a text file containing the letter A with notepad, you will see the binary format of ASC of.
After an occasional opportunity, I thought it was strange. Then I understood it.
In addition, if you store text files in the past, some Encoding Problems will always occur inexplicably.
This is also a problem for many cainiao on the Internet. If the file does not need to be changed, binarywriter will be easy to use.
Let all coding problems go to hell