¿Necesito hacer StreamWriter.flush ()?
Supongamos que este código C #:
using (MemoryStream stream = new MemoryStream())
{
StreamWriter normalWriter = new StreamWriter(stream);
BinaryWriter binaryWriter = new BinaryWriter(stream);
foreach(...)
{
binaryWriter.Write(number);
normalWriter.WriteLine(name); //<~~ easier to reader afterward.
}
return MemoryStream.ToArray();
}
Mis preguntas son:
¿Necesito usar el rubor dentro del bucle para conservar el orden?Esta regresandoMemoryStream.ToArray()
¿legal? Yo usando elusing
-Bloquea como una convención, me temo que arruinará las cosas