StreamExtensionsToArray Method
Converts a stream to array of bytes. If the stream can be sought, its position will be the same as before calling this method.
Namespace: KGySoft.CoreLibrariesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
public static byte[] ToArray(
this Stream s
)
<ExtensionAttribute>
Public Shared Function ToArray (
s As Stream
) As Byte()
public:
[ExtensionAttribute]
static array<unsigned char>^ ToArray(
Stream^ s
)
[<ExtensionAttribute>]
static member ToArray :
s : Stream -> byte[]
- s Stream
- Source stream
ByteA byte
Array with the stream content.In Visual Basic and C#, you can call this method as an instance method on any object of type
Stream. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).