The word Buffer itself says that it works on direct Memory. In .NET, it is basically a manipulation of unmanaged memory represented as arrays of bytes.
2字节数组 byte[ ] arraySample
You are dealing with binary data that is organized into a series of bytes in your C# program, which may be part of a data file, image file, compressed file, downloaded server response, or many other files. The C# language provides a byte array type that is an ideal representation of this data in terms of its accurate representation in memory. Here we examine the byte array type in the C# language.
3 memory stream
The MemoryStream class creates streams that have memory as a backing store instead of a disk or a network connection. MemoryStream encapsulates data stored as an unsigned byte array that is initialized upon creation of a MemoryStream object, or the array can be created as empty.