title: How to get the result from the Barcodereader-Method into my constructor (to make it accessable)?
body: <p>how can I access the result-string which is read by my method <code>Scan()</code> called on the <code>Clicked Event</code> from my <code>Button</code>?</p>
  
  <p>I just want to pass the data in the background and access them from one point to form them into a combined string for an interface purpose.</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  
  using Xamarin.Forms;
  using Xamarin.Forms.Xaml;
  
  namespace TDE
  {
      [XamlCompilation(XamlCompilationOptions.Compile)]
      public partial class Page1 : ContentPage
      {
          public Page1 ()
          {
              InitializeComponent ();
  
              var layout = new StackLayout()
              {
                  Margin = 10,
                  Spacing = 20
              };
              var label = new Label
              {
                  Text = "Bitte Scannen Sie den Barcode und geben noch folgende Informationen ein, um den Vorgang abzuschließen:",
                  FontSize = 30,
                  FontAttributes = FontAttributes.Bold
              };
              var button = new Button
              {
                  Text = "Hier Fahrzeug Scannen",
                  TextColor = Color.FromHex("#004d93"),
                  VerticalOptions = LayoutOptions.FillAndExpand,
                  HorizontalOptions = LayoutOptions.FillAndExpand
              };
              var entry_Kraftstoffmenge = new Entry
              {
                  Placeholder = "Getankte Kraftstoffmenge in Liter",
                  PlaceholderColor = Color.FromHex("#004d93"),
                  HorizontalTextAlignment = TextAlignment.Center
          };
              var entry_Fahrer = new Entry
              {
                  Placeholder = "Hier Ihr Name / Kürze",
                  PlaceholderColor = Color.FromHex("#004d93"),
                  HorizontalTextAlignment = TextAlignment.Center
              };
              var entry_KMStd = new Entry
              {
                  Placeholder = "KM-Stand in KM / Stunden in h",
                  PlaceholderColor = Color.FromHex("#004d93"),
                  HorizontalTextAlignment = TextAlignment.Center
              };
              var entry_Geraet = new Entry
              {
                  Placeholder = "Gerätename",
                  PlaceholderColor = Color.FromHex("#004d93"),
                  HorizontalTextAlignment = TextAlignment.Center
              };
  
              layout.Children.Add(label);
              layout.Children.Add(button);
              layout.Children.Add(entry_Kraftstoffmenge);
              layout.Children.Add(entry_Fahrer);
              layout.Children.Add(entry_KMStd);
              layout.Children.Add(entry_Geraet);
  
              Content = layout;
  
              button.Clicked += ButtonScannen;
  
          }
  
          void ButtonScannen(object sender, EventArgs e)
          {
              Scan();
          }
  
          public async void Scan()
          {
              var scanner = new ZXing.Mobile.MobileBarcodeScanner();
              var result = await scanner.Scan();
              var _tankbomb = "";
              if (result != null)
              {
                  _tankbomb = result.ToString();
                  await DisplayAlert("Erkanntes Fahrzeug", _tankbomb, "Ok");
              }
              else
              {
                  _tankbomb = "000000";
                  await DisplayAlert("Fahrzeug nicht erkannt", "Es wurde ein Dummy-Fahrzeug eingetragen!", "Ok");
              }
          }
  
      }
  }
  </code></pre>