Este es mi code:
using (FileStream fs = new FileStream(@"2.bin", FileMode.Open, FileAccess.Read))
{
byte[] coming= new byte[1];//------------->> AYUDA
byte readd;
FileStream fileStream = new FileStream(fileName, FileMode.Create);
for (offset = 1; offset <= fs.Length; offset++)
{
fs.Seek(-offset, SeekOrigin.End);
//Console.Write(Convert.ToChar(fs.ReadByte()));
int readb = fs.ReadByte();
readd = Convert.ToByte(readb);
//fileStream.WriteByte(readd);
coming[+1] =readd;// ----------------------->>AYUDA
}
}
Necesito rellenar el coming[] con los bytes de readd, no tengo ni idea de como declarar el array.
Byte[] coming = new byte[fs.length - 1];
fs.read(coming, 0, coming.length);
Generas un array del mismo tamaño que el archivo binario leído para posteriormente volcar el contenido en dicho array.
Saludos!
Muchas gracias.
Me a servido de mucha ayuda.
Eres un Crack
oh dios kub0x que le ha pasado a tu avatar? :o
Porfavor, no reabrir temas resueltos para hacer comentarios OffTopic '¬¬ :P
PD: A mi tampoco me gusta el "antifaz" de VisualStudio que se puso el compañero KuB0x xD.
Tema cerrado.