I'm lost, comming from VB to c#

E

Edwin Knoppert

I'm doing some c# in VWD.
In VB-mode i can select a page event and VWD inserts the call for me.
Why isn't this in c# ?
What's the best way to do this?
 
K

Karl Seguin [MVP]

Ya...it's a nice feature of VB.NET. The best way to do it in C# is to hand
code it :)

intellisense will often kick in if you simply type in the word "override"
witin a class where you want ur method.

Karl
 
E

Edwin Knoppert

yes, that helps a lot but in this case OnUnload() inserted:
base.OnUnload(e);

This is normal right (since it seems to be an override which is not the case
in VB) ?

Full:
protected override void OnUnload(EventArgs e)
{
base.OnUnload(e);
}

I found out that there much more differences between these two than
anticipated.
For the ones needing a comparisation:
http://www.dnzone.com/ShowDetail.asp?NewsId=356



"Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
net> schreef in bericht news:O01Fc%[email protected]...
 
K

Karl Seguin [MVP]

That's right. You can "overrides" (extra s) in VB.Net as well, in which case
you need to call the base method using MyBase.OnUnload(e). Many people
prefer to override than the magic done by VB.NET because it's more
conventional and follows OO paradigms. You also have control over whether or
not the base method should be called, and when (normally you put it at the
end of the method, but sometimes you want it elsewhere).

Karl
--
http://www.openmymind.net/
http://www.fuelindustries.com/


Edwin Knoppert said:
yes, that helps a lot but in this case OnUnload() inserted:
base.OnUnload(e);

This is normal right (since it seems to be an override which is not the
case in VB) ?

Full:
protected override void OnUnload(EventArgs e)
{
base.OnUnload(e);
}

I found out that there much more differences between these two than
anticipated.
For the ones needing a comparisation:
http://www.dnzone.com/ShowDetail.asp?NewsId=356



"Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
net> schreef in bericht news:O01Fc%[email protected]...
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top