SocketAsyncEventArgs.SetBuffer Method (Int32, Int32)
Sets the data buffer to use with an asynchronous socket method.
Assembly: System (in System.dll)
An argument was out of range. This exception occurs if the offset parameter is less than zero or greater than the length of the array in the Buffer property. This exception also occurs if the count parameter is less than zero or greater than the length of the array in the Buffer property minus the offset parameter.
The offset and count parameters can't be negative numbers. The combination of the offset and count parameters must be in bounds of the buffer array in the Buffer property.
This method sets the Count property to the count parameter and the Offset property to the offset parameter. If the Buffer property is null, this method ignores the offset and count parameters and sets the Offset and Count properties to 0.
This method does not change the Buffer property.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.