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.

适用于

另请参阅