|
BlockAllocatedMemoryStreamToArray Method
|
Writes the stream contents to a byte array, regardless of the
Position property.
Namespace: GSF.IOAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.249-beta+56964f8aed6f3f2e54faec1539f7ce0ba6548fdf
SyntaxPublic Function ToArray As Byte()
public:
array<unsigned char>^ ToArray()
member ToArray : unit -> byte[]
View SourceReturn Value
ByteA
Byte[] containing the current data in the stream
ExceptionsException | Condition |
---|
InvalidOperationException | Cannot create a byte array with more than 2,147,483,591 elements. |
ObjectDisposedException | The stream is closed. |
Remarks
This may fail if there is not enough contiguous memory available to hold current size of stream.
When possible use methods which operate on streams directly instead.
See Also