Core/CafeLib.Core/Extensions/StreamExtensions.cs
/// <summary>
/// Converts stream to byte array.
/// </summary>
/// <param name="stream">stream</param>
/// <returns>byte array</returns>
Converts stream to byte array.
Converts stream to byte array .
public static byte[] ToByteArray(this Stream stream)
        {
            using var memoryStream = stream.ToMemoryStream();
            return memoryStream.ToArray();
        }
public static byte [ ] ToByteArray ( this Stream stream ) { using var memoryStream = stream . ToMemoryStream ( ) ; return memoryStream . ToArray ( ) ; }
Converts stream to byte array.
Converts stream to byte array .
None
Stream
this
stream
None