mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-23 04:53:09 +00:00
22 lines
453 B
C#
22 lines
453 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
|
|||
|
namespace System.IO
|
|||
|
{
|
|||
|
public static class StreamExtenstios
|
|||
|
{
|
|||
|
public static byte[] ToArray(this Stream stream)
|
|||
|
{
|
|||
|
using (var memoryStream = new MemoryStream())
|
|||
|
{
|
|||
|
stream.CopyTo(memoryStream);
|
|||
|
|
|||
|
return memoryStream.ToArray();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|