title: How to end an active call in skype
body: <p>I am using the Skype API for video calling. Now I have a button to end the call. I wrote the following code on button's click:</p>
  
  <pre><code>if (skype.ActiveCalls.Count &gt; 0)
  {
      skype.ActiveCalls[0].Finish();
  
      //conference calls
      //for (int i = 0; i &lt; skype.ActiveCalls.Count; i++)
      //{
          //if (skype.ActiveCalls[i + 1].ConferenceId &gt; 0)
          //{
              //skype.ActiveCalls[i + 1].Finish();
              //call = skype.;
          //}
      //}
  }
  </code></pre>
  
  <p>but it is throwing exception:</p>
  
  <blockquote>
    <p>Value does not fall within the expected range.</p>
  </blockquote>
  
  <p>How to end an active call?</p>