📜  内存流到数组 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:07.892000             🧑  作者: Mango

代码示例3
public static byte[] ReadFully(Stream input)
{
    using (MemoryStream ms = new MemoryStream())
    {
        input.CopyTo(ms);
        return ms.ToArray();
    }
}