Novice C# qu: Converting VB to C#

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.
 
D

DalePres

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top