Why are event raising methods marked as protected virtual?(des-eisbaeren-blog.de)

submitted by GoloGolo(380) 4 years, 1 month ago

This article discusses why the OnXYZ methods should be marked as protected virtual.

1 comment |category: |Views: 4

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by zigamorphzigamorph(3319) 4 years, 1 month ago 0

actually the code should read

protected virtual void OnEvent (EventArgs e) {
}

There shouldn't be an override, because override is what is done to the virtual.

Reply

information Login or create an account to comment on this story