views:

123

answers:

1

I'm trying to learn the MapKit with Monotouch and I'm having difficulty figuring out how to search for an address. I finally found this snippet of Objective-C code that might help but it has a line where they use a URL to get a return value and I have no idea how to use this code in C#:

NSString *urlString = [NSString stringWithFormat:@"http://maps.google.com/maps/geo?q=%@&output=csv", [addressField.text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];

If anyone could give me some advice that would be helpful.

A: 

This is equivalent to:

string urlString = String.Format(@"http://maps.google.com/maps/geo?q={0}&output=csv", System.Web.HttpServerUtility.UrlEncode(addressField.text))
Dexter
Oops, I posted the wrong snippet of code but thanks for your correct answer!:)
Pselus