title: Beginner C#: using object o, RoutedEventArgs sender
body: <p>Basically I want my application to run a timer, I found the following code to use:</p>
  
  <pre><code>public void StartTimer(object o, RoutedEventArgs sender)
  {
      System.Windows.Threading.DispatcherTimer myDispatcherTimer = new System.Windows.Threading.DispatcherTimer();
      myDispatcherTimer.Interval = new TimeSpan(0, 0, 0, 0, 100); // 100 Milliseconds 
      myDispatcherTimer.Tick += new EventHandler(Each_Tick);
      myDispatcherTimer.Start();
  }
  
  // A variable to count with.
  int i = 0;
  
  // Raised every 100 miliseconds while the DispatcherTimer is active.
  public void Each_Tick(object o, EventArgs sender)
  {
      myTextBlock.Text = "Count up: " + i++.ToString();
  }
  </code></pre>
  
  <p>But I don't understand how to call StartTimer, </p>
  
  <pre><code>private void Button_Click_1(object sender, RoutedEventArgs e)
  {
      StartTimer();
  }
  </code></pre>
  
  <p>Doesn't work because it says no overload takes zero arguments, but I don't know what arguments to use for object sender and RoutedEventsArgs e such that it works.</p>
  
  <p>I know this is a beginner question but I have been doing a lot of searching to no avail, would really appreciate any help!</p>