My class has to open a .txt file which contains some characters in ASCII, when opening it, this file must be stored in a byte [], in order to extract some specific locations from the document and to be able to modify it
My class has to open a .txt file which contains some characters in ASCII, when opening it, this file must be stored in a byte [], in order to extract some specific locations from the document and to be able to modify it
System.IO.File.ReadAllBytes(nombreArchivo)
This method returns the contents of a file in the form of byte[]
.
Example:
byte[] contenido = System.IO.File.ReadAllBytes("c:/miarchivoTexto.txt");