title: How to tell if a line intersects a polygon in C#?
body: <p>I have a question very similar to this: </p>
  
  <blockquote>
    <p><a href="https://stackoverflow.com/q/30080/3924118">How to know if a line intersects a plane in C#?</a></p>
  </blockquote>
  
  <p>I am searching for a method (in C#) that tells if a line is intersecting an arbitrary polygon.</p>
  
  <p>I think the <a href="https://stackoverflow.com/a/30109/3924118">algorithm by Chris Marasti-Georg</a> was very helpful, but missing the most important method, i.e. line to line intersection.</p>
  
  <p>Does anyone know of a line intersection method to complete Chris Marasti-Georg's code or have anything similar?</p>
  
  <p>Is there a built-in code for this in C#?</p>
  
  <p>This method is for use with the Bing Maps algorithm enhanced with a forbidden area feature. The resulting path must not pass through the forbidden area (the arbitrary polygon).</p>