c# 异步事件

public event EventHandler ProgressChanged;

private void RaiseProgressChangedEvent()
        {
            if (this.ProgressChanged != null)
            {
                var delegateArray = this.ProgressChanged.GetInvocationList();
                foreach (EventHandler dele in delegateArray)
                    dele.BeginInvoke(this, EventArgs.Empty, null, null);
            }
        }

 

posted on 2021-01-20 15:46  空明流光  阅读(458)  评论(0编辑  收藏  举报

导航