0

I initialize this as _mapView = Globals.AppMainMapView; at constructor

Error occurred here when I use _mapView :

if (_mapView.Editor.Cancel.CanExecute(null))
{
    _mapView.Editor.Cancel.Execute(null);
}
Gilad Green
  • 36,708
  • 7
  • 61
  • 95
Menna Elrefay
  • 111
  • 1
  • 9
  • 5
    which means `_mapView` is `null` at the time you tried to access it. [take a Look at this](http://stackoverflow.com/questions/4660142/what-is-a-nullreferenceexception-and-how-do-i-fix-it) – sujith karivelil Aug 23 '16 at 07:25
  • 1
    or _mapView.Editor, or _mapView.Editor.Cancel, or the method CanExecute tries to us a property or method of the object you pass (which is null) – fixagon Aug 23 '16 at 07:28

0 Answers0