Any C# equivalent to ByteArrayOutputStream?

lozina

Lifer
Sep 10, 2001
11,711
8
81
I'm looking for a C# class similar to Java's ByteArrayOutputStream. Basiclaly I am reading bytes from an InputStream and want to append these bytes to some kind of class that will grow as required (can hold any number of bytes, don't have to specify a length like using an array). Then later I need to pull out a byte[] array from this class to use elsewhere.