EventHandlerList.Item[Object] 屬性

定義

取得或設定指定物件的委派。Gets or sets the delegate for the specified object.

public:
 property Delegate ^ default[System::Object ^] { Delegate ^ get(System::Object ^ key); void set(System::Object ^ key, Delegate ^ value); };
public Delegate this[object key] { get; set; }
member this.Item(obj) : Delegate with get, set
Default Public Property Item(key As Object) As Delegate

參數

key
Object

要在清單中尋找的物件。An object to find in the list.

屬性值

指定索引鍵的委派,如果委派不存在,則為 nullThe delegate for the specified key, or null if a delegate does not exist.

備註

如果在清單中找不到索引鍵,而且您提供委派來設定金鑰的值,則會將索引鍵新增至清單頂端,並將其指派給委派做為其值。When the key is not found in the list and you provide a delegate to set the value of the key, then the key is added to the top of the list and assigned to the delegate as its value.

適用於

另請參閱