Translate

> > Create your own Event using delegate

Create your own Event using delegate

Posted on Monday, November 21, 2011 | No Comments

public delegate void afterButtonClick();

public event afterButtonClick onButtonClick;

private void btnSubmit_Click(object sender, EventArgs e)
        {
            if (onButtonClick != null)
            {
                onButtonClick();
            }
        }


Use this code on Class , like custom control , when use this control you will find your event on event list of this control.

Leave a Reply

Powered by Blogger.