コード例 #1
0
 protected virtual void OnTemperatureChanged(TemperatureChangedEventArgs e)
 {
     if (TemperatureChanged != null)
     {
         TemperatureChanged(this, e);
     }
 }
コード例 #2
0
 protected void TemperatureChangeHandler(object sender, TemperatureChangedEventArgs args)
 {
     Console.WriteLine($"{this.GetType().Name} observed {args.Temperature}");
 }