Adds or replaces the data field of this command APDU.

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

Public Sub SetData( _ 
ByVal vbData As Byte() _ 
)
This language is not supported or no code example is available.
public void SetData( 
byte[] vbData 
)
This language is not supported or no code example is available.
public:  
void SetData( 
array< Byte >^ vbData 
)
This language is not supported or no code example is available.
public function SetData( 
vbData : byte[] 
);
This language is not supported or no code example is available.

Parameters

vbData
Type: byte[]

The data field to be set for this command APDU. The length Lc is derived from the total length of this byte array. If this parameter is null, then any existing data field will be removed. The CardCommandAPDU will keep a direct reference to the given byte array and will not make a copy of it. 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 are not permitted.

Exception type Condition

ArgumentOutOfRangeException

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

Marc, 9/29/2022.

.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