title: How to return an object from an async method (c# - xamarin.forms)?
body: <p>In a Xamarin.Forms app I'm using GeoLocator to retrieve info about my position. 
  The method is async. I have to return the object that contains the position parameters but I can't.</p>
  
  <p>This is the constructor of my class PositionPage</p>
  
  <pre><code>public PositionPage()
  {           
      getCurrentPosition();
  
      var map = new Map(
      MapSpan.FromCenterAndRadius(
          new Position(45.987487, 9.366337), Distance.FromMiles(0.3)))
          {
              IsShowingUser = true,
              HeightRequest = 100,
              WidthRequest = 960,
              VerticalOptions = LayoutOptions.FillAndExpand
          };
      var stack = new StackLayout { Spacing = 0 };
      stack.Children.Add(map);
      Content = stack;            
  }
  </code></pre>
  
  <p>And this is the async method (Now is a void method):</p>
  
  <pre><code>public async void getCurrentPosition() 
  {
      try
      {
          var locator = CrossGeolocator.Current;
          locator.DesiredAccuracy = 50;
  
          var position = await locator.GetPositionAsync(timeoutMilliseconds: 10000);
  
          Debug.WriteLine("Position Status: {0}", position.Timestamp);
          Debug.WriteLine("Position Latitude: {0}", position.Latitude);
          Debug.WriteLine("Position Longitude: {0}", position.Longitude);                
      }
      catch (Exception ex)
      {
          Debug.WriteLine("Unable to get location, may need to increase timeout: " + ex);
      }
  }
  </code></pre>
  
  <p>I need to return a position object when I call getCurrentPosition() to pass it in the MapSpan.</p>
  
  <p>How can I do that?</p>