ByteArray Constructor

Requests a new byte array.

Namespace:  Microsoft.TeamFoundation.Framework.Server
Assembly:  Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)

Syntax

'Declaration
Public Sub New ( _
    sizeRequested As Integer _
)
public ByteArray(
    int sizeRequested
)
public:
ByteArray(
    int sizeRequested
)
new : 
        sizeRequested:int -> ByteArray
public function ByteArray(
    sizeRequested : int
)

Parameters

  • sizeRequested
    Type: System.Int32

    Size of the requested array, in bytes.

Remarks

If sizeRequested is less than 2 megabytes, this.GetBytes() might come from a buffer pool. The pool buffers are of fixed sizes. Therefore, this.GetBytes().Length might be larger than sizeRequested.

Callers must:

  • Not assume the this.GetBytes() is initialized to 0.

  • Not assume that this.GetBytes().Length == sizeRequested.

  • Call Dispose() when you are finished with the buffer to return it to the pool.

.NET Framework Security

See Also

Reference

ByteArray Class

Microsoft.TeamFoundation.Framework.Server Namespace