mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-26 22:40:27 +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();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|