| ByteBufferSlice Methods | 
The ByteBufferSlice type exposes the following members.
 Methods
Methods| Name | Description | |
|---|---|---|
|  | AccessBackingBytes | 
            Access the backing bytes directly. The returned ArraySegment will point to the desired position and contain
            as many bytes as possible up to the next chunk boundary (if any). If the returned ArraySegment does not
            contain enough bytes for your needs you will have to call ReadBytes instead.
             | 
|  | Clear | 
            Clears the specified bytes.
             | 
|  | Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. | 
|  | Dispose(Boolean) | 
            Releases unmanaged and - optionally - managed resources.
             | 
|  | EnsureCapacity | 
            Ensure that the buffer has a minimum capacity. Depending on the buffer allocation strategy
            calling this method may result in a higher capacity than the minimum (but never lower).
             | 
|  | Equals | Determines whether the specified object is equal to the current object.(Inherited from Object.) | 
|  | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.) | 
|  | GetByte | 
            Gets a byte.
             | 
|  | GetBytes | 
            Gets bytes.
             | 
|  | GetHashCode | Serves as the default hash function. (Inherited from Object.) | 
|  | GetSlice | 
            Gets a slice of this buffer.
             | 
|  | GetType | Gets the Type of the current instance.(Inherited from Object.) | 
|  | MakeReadOnly | 
            Makes this buffer read only.
             | 
|  | MemberwiseClone | Creates a shallow copy of the current Object.(Inherited from Object.) | 
|  | SetByte | 
            Sets a byte.
             | 
|  | SetBytes | 
            Sets bytes.
             | 
|  | ToString | Returns a string that represents the current object.(Inherited from Object.) | 
 Extension Methods
Extension Methods| Name | Description | |
|---|---|---|
|  | ToBson | 
            Serializes an object to a BSON byte array.
            (Defined by BsonExtensionMethods.) | 
|  | ToBsonDocument | 
            Serializes an object to a BsonDocument.
            (Defined by BsonExtensionMethods.) | 
|  | ToJson | 
            Serializes an object to a JSON string.
            (Defined by BsonExtensionMethods.) | 
 See Also
See Also