A blog about 3DGS, Nerds and a lot of other stuff

Why easy, if you can do it complicated?

April 29th, 2008 Michael Schwarz and categorized as Stupidity, This Humanity has no Future

Sometimes you just want to smash someone’s head into a wall when you read a “tutorial” about something (in this case, how to handle even risings correctly in case there is no subscriber by using a protected virtual void in C#) that has about one dozen of chapters and you don’t understand a gorram thing. Then you go to the next entry in Google. A short one-paragraph article with a 10-line code example - Understood it right away.

Yeah… why easy, if you can do it complicated? Right?

Anyway, in case anyone is interested:
http://www.softsteel.co.uk/tutorials/cSharp/lesson16.html

   1: public class EventIssuer
   2: {
   3:     public delegate void EventDelegate(object from, EventArgs args);
   4:     public event EventDelegate myEvent;
   5:     
   6:     protected virtual void onMyEvent(EventArgs args)
   7:     {
   8:         if (myEvent != null)
   9:             myEvent(this, args);
  10:     }
  11: }

This article has been read 68 times

2 Comments

  • At 2008.05.20 09:33, broozar said:

    you haven’t updated this blog for such a long time. lost your interest in 3dgs :P hehe. well, keep us updated!

    • At 2008.05.23 14:19, Michael Schwarz said:

      yeah well, work is keeping me busy ;P

    Author (Required)

    Mail (Will not be published) (But required anyway)

    Website (Woo, optional!)