IRemoteArgumentDictionaryEnumeratorContract.GetKey Method

Definition

Returns the key of the current IRemoteArgumentDictionaryContract entry.

public:
 System::AddIn::Contract::RemoteArgument GetKey();
public System.AddIn.Contract.RemoteArgument GetKey ();
abstract member GetKey : unit -> System.AddIn.Contract.RemoteArgument
Public Function GetKey () As RemoteArgument

Returns

A RemoteArgument that contains the key of the current IRemoteArgumentDictionaryContract entry.

Exceptions

The IRemoteArgumentDictionaryEnumeratorContract is positioned before the first entry of the IRemoteArgumentDictionaryContract or after the last entry.

Remarks

After an enumerator is created or after the Reset method is called, the MoveNext method must be called to advance the enumerator to the first element of the collection before calling the GetKey method; otherwise, the return value of GetKey is undefined.

GetKey also throws an exception if the last call to MoveNext returned false, which indicates the end of the collection.

GetKey does not move the position of the enumerator, and consecutive calls to GetKey return the same object until either MoveNext or Reset is called.

Applies to