Groups | Blog | Home
all groups > c# > february 2005 >

c# : Novice C# qu: Converting VB to C#


david
2/9/2005 7:48:53 PM
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.
DalePres
2/9/2005 10:49:43 PM
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



[quoted text, click to view]

david
2/11/2005 8:53:01 AM
Thank you!
David

[quoted text, click to view]
AddThis Social Bookmark Button