I am developing an application in Windows 8 Visual studio 11, and I want to define an event handler for the DispatcherTimer instance, as shown below:
public sealed partial class BlankPage : Page { int timecounter = 10; DispatcherTimer timer = new DispatcherTimer(); public BlankPage() { this.InitializeComponent(); timer.Tick += new EventHandler(HandleTick); } private void HandleTick(object s,EventArgs e) { timecounter--; if (timecounter ==0) {
But I get the following error:
Cannot implicitly convert type 'System.EventHandler' to 'System.EventHandler<object>'
I am a novice developer to invest 8 applications.
Could you help me?
Babak fakhriloo
source share