public class ByteWriter { public MemoryStream Stream = new MemoryStream(); public BinaryWriter Writer; public ByteWriter() { Writer = new BinaryWriter(Stream); } public void Write<T>(T value) { Writer.Write(value); }}
public class ByteWriter { public MemoryStream Stream = new MemoryStream(); public BinaryWriter Writer; public ByteWriter() { Writer = new BinaryWriter(Stream); } public void Write<T>(T value) { Writer.Write(value); }}
im trying to write a method that will append the bytes for value to the stream
Stream
Stream
, T will be a variable amount of bytes so im taking it in as a generic type, but
Write
Write
doesnt have a generic overload any ideas what i can do?