AsByteArray Method
AsByteArray()
Transforms the CommandApdu into an array of bytes.
C#
public byte[] AsByteArray()
Returns
System.Byte[]
An array of bytes representing an ISO 7816 CommandApdu.
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when no valid ApduEncoding scheme is found for the current state of CommandApdu. |
Remarks
Automatically determines the appropriate encoding to use. See also AsByteArray(ApduEncoding).
AsByteArray(ApduEncoding)
Transforms the CommandApdu into an array of bytes.
C#
public byte[] AsByteArray(ApduEncoding apduEncoding)
Parameters
Type | Name | Description |
---|---|---|
ApduEncoding | apduEncoding | The ApduEncoding in which the output is written. |
Returns
System.Byte[]
An array of bytes representing an ISO 7816 CommandApdu.
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when no valid ApduEncoding scheme is found for the current state of CommandApdu. |
System.ArgumentOutOfRangeException | Thrown when |
Remarks
All CommandApdu fields must be valid for the given
apduEncoding
.