共用方式為


WeakEventManager.AddEventHandler 方法

定義

多載

AddEventHandler(EventHandler, String)
AddEventHandler<TEventArgs>(EventHandler<TEventArgs>, String)

AddEventHandler(EventHandler, String)

public void AddEventHandler (EventHandler handler, string eventName = default);
member this.AddEventHandler : EventHandler * string -> unit

參數

handler
System.EventHandler
eventName
System.String

適用於

AddEventHandler<TEventArgs>(EventHandler<TEventArgs>, String)

public void AddEventHandler<TEventArgs> (EventHandler<TEventArgs> handler, string eventName = default) where TEventArgs : EventArgs;
member this.AddEventHandler : EventHandler<'EventArgs (requires 'EventArgs :> EventArgs)> * string -> unit (requires 'EventArgs :> EventArgs)

類型參數

TEventArgs

參數

handler
System.EventHandler<TEventArgs>
eventName
System.String

適用於