Click or drag to resize
UnpackingUnpackString Method (Byte, Int32)
Unpacks String value from specified offsetted byte array with UTF-8 encoding.

Namespace: MsgPack
Assembly: MsgPack (in MsgPack.dll) Version: 0.6.0
public static UnpackingResult<string> UnpackString(
	byte[] source,
	int offset


Type: SystemByte
The byte array which contains Message Pack binary stream.
Type: SystemInt32
The offset to be unpacking start with.

Return Value

Type: UnpackingResultString
The UnpackingResultT of String which contains unpacked String value and processed bytes count.
ArgumentNullExceptionsource is null.
ArgumentExceptionsource is empty. Or, the length of source is not greater than offset.
ArgumentOutOfRangeExceptionoffset is negative value.
UnpackExceptionsource is not valid MessagePack stream.
MessageTypeException The unpacked result in the source is not compatible to String. Or, the unpacked result in the source is invalid as specified encoding byte stream.

Invocation of this method is equivalant to call UnpackString(Byte, Int32) with offset is 0.

When the type of packed value is not known, use UnpackObject(Byte) instead.

See Also