I am using InvokeScript on a WebBrowser control to try and make a simple map using the Google Maps JavaScript API for HTML. I have a few functions written in the HTML page in Ja
Simply use dynamic feature of C# and .NET DLR, and return the JavaScript structures as is:
dynamic
dynamic data = webBrowser1.Document.InvokeScript("eval", new[] { "(function() { return { latitude: 1, longitude: 2 }; })()" }); MessageBox.Show("Data: " + data.latitude + ", " + data.longitude);