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

Signature
http://www.openmymind.net/
> 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?
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
> Ya...it's a nice feature of VB.NET. The best way to do it in C# is to hand
> code it :)
[quoted text clipped - 7 lines]
>> Why isn't this in c# ?
>> What's the best way to do this?
Karl Seguin [MVP] - 16 Feb 2006 13:22 GMT
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

Signature
http://www.openmymind.net/
http://www.fuelindustries.com/
> yes, that helps a lot but in this case OnUnload() inserted:
> base.OnUnload(e);
[quoted text clipped - 24 lines]
>>> Why isn't this in c# ?
>>> What's the best way to do this?