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.Int32Size 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.