Method ToByteArray
ToByteArray()
Converts value of this instance to byte array.
Declaration
public virtual byte[] ToByteArray()
Returns
Type | Description |
---|---|
Byte[] | Value of this instance as byte array. |
Remarks
This conversion is valid only for instances of
BinaryValue or instances of
StringValue containing Base64-encoded binary
data.
Exceptions
Type | Condition |
---|---|
InvalidCastException | If this instance is not BinaryValue or StringValue. |
FormatException | If this instance is StringValue and contains invalid Base64 string. |