converting vb.net to c# help

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

I am trying to convert this piece of code to c# from
vb.net. Does anyone have any ideas?

Private Sub Page_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles MyBase.Load
 
Steve,

You can do this:

private void Page_Load(object sender, EventArgs e)

However, that is only part of it. You will have to create the delegate
and assign the method, like this:

Load += new EventHandler(this.Page_Load);

This should be done in the InitializeComponent method on your Page class
(if the designer was the one that created it).

Hope this helps.
 
Back
Top