Jeff,
Briefly, a delegate tells .NET what method you want to use to handle an event. Say you have a button and you want it to do something when it's clicked.
First you have to define the delegate, to tell .NET which method is your eventhandler:
this.MyButton.Click += new System.EventHandler(this.MyButton_Click);
... then you define the eventhandler method itself:
private void MyButton_Click(object sender, System.EventArgs e)
{
}
~~Bonnie
>OK, OK... You get a few more <g>
>
>What's it all about? What's a delegate, and why would I use one?
>
>
>
>>
>>Bonnie, could you explain delegates, in five words or less? <>>
>>Sure ... "How one must handle events." Count 'em, that's 5 words. =)
>>
>>~~Bonnie