Generic ISO 7816-4 command for reading a record from the currently selected elementary file with record structure.

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

Public Function ReadRecord( _ 
ByVal nRecNo As Byte, _ 
ByVal nLength As Byte
) As CardResponseAPDU
This language is not supported or no code example is available.
public CardResponseAPDU ReadRecord( 
byte nRecNo
byte nLength 
)
This language is not supported or no code example is available.
public:  
CardResponseAPDU^ ReadRecord( 
Byte nRecNo
Byte nLength 
)
This language is not supported or no code example is available.
public function ReadRecord( 
nRecNo : byte
nLength : byte 
) : CardResponseAPDU;
This language is not supported or no code example is available.

Parameters

nRecNo
Type: byte

Absolute record number of record to be read. The first record usually has the record number 1.

nLength
Type: byte

Number of bytes to read from record. If this is zero, then the entire record is read.

Return Value

Type: CardResponseAPDU

The complete response APDU is returned. The property CardResponseAPDU.IsSuccessful can be used to check whether the record was read successfully. The read record is available through the CardResponseAPDU.GetData method.

Exception type Condition

CardTerminalException

Thrown when a Card Terminal error condition occurs.

This method uses the following generic command APDU: CLA 'B2' RN '04' LE, where RN is record number byte and LE is the given length byte.

Note that this method does not work with ACOS1 cards which would need the byte value '00' in P2 instead of the correct ISO 7816-4 value '04' which is used here.

.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