Share via


BufferManager.TakeBuffer Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets a buffer of at least the specified size from the pool.

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

Syntax

'Declaration
Public MustOverride Function TakeBuffer ( _
    bufferSize As Integer _
) As Byte()
public abstract byte[] TakeBuffer(
    int bufferSize
)

Parameters

  • bufferSize
    Type: System.Int32
    The size, in bytes, of the requested buffer.

Return Value

Type: array<System.Byte[]
A byte array that is the requested size of the buffer.

Exceptions

Exception Condition
ArgumentOutOfRangeException

bufferSize cannot be less than zero.

Remarks

If successful, the system returns a byte array buffer of at least the requested size.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.