[英]Xamarin Android: Ilist<Address> does not contain a definition for 'Any'
I'm trying obtain adrress from Location using this steps. 我正在尝试使用此步骤从Location获取地址。 I obtain correctly latitude and longitude, but I need specific address too.
我可以正确获取纬度和经度,但是我也需要特定的地址。 If exist other tutorial to obtain this.
如果存在其他教程则可获得此。
http://developer.xamarin.com/recipes/android/os_device_resources/gps/get_current_device_location/ http://developer.xamarin.com/recipes/android/os_device_resources/gps/get_current_device_location/
void InitializeLocationManager()
{
_locationManager = (LocationManager)GetSystemService(LocationService);
Criteria criteriaForLocationService = new Criteria
{
Accuracy = Accuracy.Fine
};
IList<string> acceptableLocationProviders = _locationManager.GetProviders(criteriaForLocationService, true);
if (acceptableLocationProviders.Any())
{
_locationProvider = acceptableLocationProviders.First();
}
else
{
_locationProvider = String.Empty;
}
}
In this code the errors are: 在此代码中的错误是:
System.Collection.Generic.Ilist does not contain a definition for 'Any'
System.Collection.Generic.Ilist不包含
'Any'
的定义
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.