title: C# - How to stop timer from within another function?
body: <p>I created a timer Element (timerA) and try to stop it inside a function:</p>
  
  <pre><code>public static string sendWebRequest(string URL) {...}
  </code></pre>
  
  <p>How can I achive this?</p>
  
  <p>I tried it like this:</p>
  
  <pre><code>public static string sendWebRequest(string URL)
  {
      ...
      timerA.Stop();
  }
  </code></pre>
  
  <p>I get <code>The non-static field, method, or property "main.timerA" requires an object reference</code> (main is the name of the form).</p>
  
  <p>So I tried it like this:</p>
  
  <pre><code>main.timerA.Stop();
  </code></pre>
  
  <p>But I get the same error.</p>