Suppose I have hundreds, or even thousands of GPS coords, Latitude and Longitude that make up a boundary around a country.

I also have my current position Latitude and Longitude.

How can I determine (using C#, programming for Windows10 UWP) if my position is within the boundary of a country?

E.G. Suppose I have all the points that make up red line in the image below. If I was at the X location, my function would return true. If I were at the Y location, my function would return false.

[![MapExample](https://i.stack.imgur.com/RRoTW.png)](https://i.stack.imgur.com/RRoTW.png)