Language

MifareClassic.TransferAsync(Int32) Method

Definition

Copies the tag's temporary block to a value block on a thread-pool thread.

public System.Threading.Tasks.Task TransferAsync(int blockIndex);
member this.TransferAsync : int -> System.Threading.Tasks.Task

Parameters

blockIndex
Int32

The zero-based index of the destination value block, from 0 through 255. The block must be available on the tag.

Returns

A task that represents the transfer operation.

Remarks

This managed wrapper uses Task.Run to call Transfer(Int32). Connect and authenticate the destination sector first. Set the temporary value with an increment, decrement, or restore operation and await that operation before calling this method.

The synchronous method's connection, access, and NFC permission requirements apply. The method has no cancellation-token parameter. Calling Close() from another thread cancels blocked I/O with IOException. Exceptions from the synchronous call are reported through the task.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to