Is it possible to replicate what the code in here does in MonoTouch?
Here is what I’ve tried so far:
foreach(string countryCode in NSLocale.ISOCountryCodes){
// How to convert this objective-c code to c#?
// [[NSLocale currentLocale] displayNameForKey:NSLocaleCountryCode value:countryCode]
}
Sadly a quick look shows that displayNameForKey:value: to be (currently as of 4.2.x) missing from MonoTouch (and MonoMac) bindings. I’ll look into implementing it and will update this entry once done.
UPDATE : Source code to work around the missing binding
Adapt to your liking and have fun with MonoTouch!
p.s. I’ll update the bindings so it will be included in future releases for MonoTouch in a more proper API 😉