codefoster | Creating a Timer in Windows 8 (C#)
Jeremy Foster
@codefoster

Creating a Timer in Windows 8 (C#)

by Jeremy Foster 30. March 2012 10:16

Ready for the shortest blog post in history?

Looking for a time in Windows 8? Look no further. Just drop this code into the App constructor on the App.xaml.cs page…

var d = new DispatcherTimer();
d.Start();
d.Tick += (sender, o) => { Debug.WriteLine("tick"); };

Now go take a look at Visual Studio’s Output pane and watch it tick.

Tags:

Windows 8

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

Feed Subscribe