This is my list of code snippets useful when writing (geo)graphical applications in C#. Of course there are many powerful .NET libraries which handle these problems. But sometimes it is easier to just include some lines of code.
I've written the code to run directly in the browser using JSIL. You can extract the essential lines in your project. It should work for .NET, Mono, Silverlight, WinRT and Windows Phone. I've included the base types needed (Point, Rect) into the snippet. You can replace them with the appropriate type of the framework you are using.
For example: If you use the line simplification for WPF lines, you can take the System.Windows.Point. If you use it for WCF Spatial Library, you can take the [System.Spatial.GeometryPoint](http://msdn.microsoft.co