Document Solutions for PDF
GrapeCity.Documents.DX.Windows Assembly / GrapeCity.Documents.DX Namespace / DataStream Class / Create<T> Method
A managed array to be used as a backing store.
true if reading from the buffer should be allowed; otherwise, false.
true if writing to the buffer should be allowed; otherwise, false.
Index inside the buffer in terms of element count (not size in bytes).
True to keep the managed buffer and pin it, false will allocate unmanaged memory and make a copy of it. Default is true.

In This Topic
    Create<T> Method (DataStream)
    In This Topic
    Initializes a new instance of the DataStream class, using a managed buffer as a backing store.
    Syntax
    'Declaration
     
    Public Shared Function Create(Of T As {New, Struct})( _
       ByVal userBuffer() As T, _
       ByVal canRead As System.Boolean, _
       ByVal canWrite As System.Boolean, _
       Optional ByVal index As System.Integer, _
       Optional ByVal pinBuffer As System.Boolean _
    ) As DataStream
    public static DataStream Create<T>( 
       T[] userBuffer,
       System.bool canRead,
       System.bool canWrite,
       System.int index,
       System.bool pinBuffer
    )
    where T: new(), struct

    Parameters

    userBuffer
    A managed array to be used as a backing store.
    canRead
    true if reading from the buffer should be allowed; otherwise, false.
    canWrite
    true if writing to the buffer should be allowed; otherwise, false.
    index
    Index inside the buffer in terms of element count (not size in bytes).
    pinBuffer
    True to keep the managed buffer and pin it, false will allocate unmanaged memory and make a copy of it. Default is true.

    Type Parameters

    T
    See Also