EventHandlerList.Item[Object] 屬性
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定指定物件的委派。
public:
property Delegate ^ default[System::Object ^] { Delegate ^ get(System::Object ^ key); void set(System::Object ^ key, Delegate ^ value); };
C#
public Delegate? this[object key] { get; set; }
C#
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
要在清單中尋找的物件。
指定索引鍵的委派,如果委派不存在,則為 null
。
在清單中找不到索引鍵,而您提供委派來設定索引鍵的值時,會將索引鍵新增至清單頂端,並指派給委派做為其值。
產品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |