ComponentOne Bitmap for WPF
C1.WPF.DX.4.5.2 Assembly / C1.Util.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 Boolean, _
       ByVal canWrite As Boolean, _
       Optional ByVal index As Integer, _
       Optional ByVal pinBuffer As Boolean _
    ) As DataStream
    public static DataStream Create<T>( 
       T[] userBuffer,
       bool canRead,
       bool canWrite,
       int index,
       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