Hunny Software Library Reference

ByteString Constructor (Byte[], Int32, Int32)

Initializes the new instance from an array of bytes.

[Visual Basic]
Overloads Public Sub New( _
   ByVal bytes As Byte(), _
   ByVal offset As Integer, _
   ByVal length As Integer _
)
[C#]
public ByteString(
   byte[] bytes,
   int offset,
   int length
);

Parameters

bytes
array of bytes
offset
position in the array of the first byte in the new ByteString instance
length
length of the new ByteString instance

Remarks

The new ByteString instance owns the byte array passed as the constructor's argument. After you call this constructor, you must not change any of the values in the byte array. (This feature allows a large buffer to be imported into the MIME.NET environment without copying.)

Exceptions

Exception TypeCondition
ArgumentOutOfRangeExceptionoffset < 0,
or length < 0,
or offset + length > bytes.Length

See Also

ByteString Class | Hunny.Base Namespace | ByteString Constructor Overload List