public bool ReadValueBlock(int blockNumber, out Int32 value) { value = 0; ReadValueBlockCommand readValueBlockCommand = new ReadValueBlockCommand((byte)blockNumber); lastApduResponse = apduPlayer.ExecuteApduCommand(readValueBlockCommand); if (lastApduResponse.Status == MifareStatus.SUCCESS) { byte[] valueBytes = ByteArray.ReverseBuffer(lastApduResponse.Data); value = BitConverter.ToInt32(valueBytes, 0); } return lastApduResponse.Status == MifareStatus.SUCCESS; }
public bool ReadValueBlock(int blockNumber, out Int32 value) { value = 0; ReadValueBlockCommand readValueBlockCommand = new ReadValueBlockCommand((byte)blockNumber); lastApduResponse = apduPlayer.ExecuteApduCommand(readValueBlockCommand); if (lastApduResponse.Status == MifareStatus.SUCCESS) { byte[] valueBytes = ByteArray.ReverseBuffer(lastApduResponse.Data); value = BitConverter.ToInt32(valueBytes, 0); } return(lastApduResponse.Status == MifareStatus.SUCCESS); }