Novice C# qu: Converting VB to C#

  • Thread starter Thread starter david
  • Start date Start date
D

david

Hi,
Can someone tell me what the C# equivalent is for:

Private Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
...more code..
End Sub

The part I am not sure is "Handles Me.Load"
Thanks.
 
Event handlers are registered by using delegates in C#. The Page.Load event
handler is specified by the following line:
this.Load += new System.EventHandler(this.Page_Load);

A complete treatise on event handlers and delegates is more than would be
practical to address here so I'd suggest you google on C# Events and
Delegates. You'll find several good articles to introduce you to the topic.



HTH



DalePres

MCAD, MCDBA, MCSE
 
Thank you!
David

DalePres said:
Event handlers are registered by using delegates in C#. The Page.Load event
handler is specified by the following line:
this.Load += new System.EventHandler(this.Page_Load);

A complete treatise on event handlers and delegates is more than would be
practical to address here so I'd suggest you google on C# Events and
Delegates. You'll find several good articles to introduce you to the topic.



HTH



DalePres

MCAD, MCDBA, MCSE
 
Back
Top