Construct CardCommandAPDU instance for an ISO 7816-4 (short or extended) case 4 "DATA_DATA" command.

Namespace: CardWerk.SmartCard
Assembly: CardWerk.SmartCard (in CardWerk.SmartCard.dll)

Public Sub New( _ 
ByVal nCLA As Byte, _ 
ByVal nINS As Byte, _ 
ByVal nP1 As Byte, _ 
ByVal nP2 As Byte, _ 
ByVal vbData As Byte(), _ 
ByVal nLe As Integer
)
This language is not supported or no code example is available.
public CardCommandAPDU( 
byte nCLA
byte nINS
byte nP1
byte nP2
byte[] vbData
int nLe 
)
This language is not supported or no code example is available.
public:  
CardCommandAPDU( 
Byte nCLA
Byte nINS
Byte nP1
Byte nP2
array< Byte >^ vbData
int nLe 
)
This language is not supported or no code example is available.
public function CardCommandAPDU( 
nCLA : byte
nINS : byte
nP1 : byte
nP2 : byte
vbData : byte[], 
nLe : int 
);
This language is not supported or no code example is available.

Parameters

nCLA
Type: byte

Class byte.

nINS
Type: byte

Instruction byte.

nP1
Type: byte

First parameter byte.

nP2
Type: byte

Second parameter byte.

vbData
Type: byte[]

Complete data field of command APDU. Up to and including a maximum length of 255 bytes, a command APDU with a short length field will be built. For data lengths from 256 bytes up to and including 65535 bytes, a command APDU with an extended length field will be built. Longer byte arrays and empty byte arrays are not permitted.

nLe
Type: int

Length of expected data. If the value is in the range 0 through 256, then a command APDU with a short length field will be built. If the value is in the range 257 through 65536, then a command APDU with an extended length field will be built.

If no length field Le shall be included, then the case 1 constructor must be used.

Exception type Condition

ArgumentOutOfRangeException

Thrown when one or more arguments are outside the required range.

ArgumentNullException

Thrown when one or more required arguments are null.

If either the length of vbData or nLe exceed the limit for a command APDU with short length fields, then a command APDU with extended length fields will be built. Only if both are within the limits for short length fields, then a command APDU with short length fields will be built.

.NET Framework

Supported in: 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

.NET Core

Supported in: 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0

.NET Standard

Supported in: 2.0