I'm making a system about seasons and I need to get a user's location to discover the current hemisphere. So I find System.Globalization namespace, but I don't know the correct property for that.
Asked
Active
Viewed 177 times
-2
-
If you know the users time zone, then you can get the hemisphere. What kind of app is this? – stuartd Apr 19 '20 at 20:51
1 Answers
0
There is no methods in System.Globalization
to get user's location to obtain information you are looking for.
You can (in reverse order of precision)
- get precise location using corresponding location API - i.e. Geolocator for UWP app.
- map user's IP to a ZIP code/city level location - Get user location by IP address
- writing custom code that maps user's preferred country code to data you need starting from
System.Globablization.CultureInfo.CurrentCulture
- How to get the country code from CultureInfo?

Alexei Levenkov
- 98,904
- 14
- 127
- 179