NuGet.StreamExtensions.ReadAllBytes C# (CSharp) Méthode

ReadAllBytes() public static méthode

public static ReadAllBytes ( this stream ) : byte[]
stream this
Résultat byte[]
        public static byte[] ReadAllBytes(this Stream stream)
        {
            int length = (int)stream.Length;
            byte[] buffer = new byte[length];
            stream.Read(buffer, 0, length);
            return buffer;
        }