Show / Hide Table of Contents

AsByteArray Method

AsByteArray()

Transforms the CommandApdu into an array of bytes.

C#
public byte[] AsByteArray()

Returns

byte[]

An array of bytes representing an ISO 7816 CommandApdu.

Exceptions

Type Condition
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

byte[]

An array of bytes representing an ISO 7816 CommandApdu.

Exceptions

Type Condition
InvalidOperationException

Thrown when no valid ApduEncoding scheme is found for the current state of CommandApdu.

ArgumentOutOfRangeException

Thrown when apduEncoding is invalid.

Remarks

All CommandApdu fields must be valid for the given apduEncoding.

In this article
Back to top Generated by DocFX