示例#1
0
 // 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);
     }
 }
示例#2
0
            // method
            public void WordChanged(object sender, WordChangedEventArgs e)
            {
                string newWord = e.Word;

                Console.WriteLine("Das neue Wort ist: " + newWord);
            }