// protected only call from this class // virtual -> can be override protected virtual void onWordChanged() { if (WordChanged != null) { WordChangedEventArgs args = new WordChangedEventArgs(); args.Word = myWord; WordChanged(this, args); } }
// method public void WordChanged(object sender, WordChangedEventArgs e) { string newWord = e.Word; Console.WriteLine("Das neue Wort ist: " + newWord); }