title: Xamarin.Forms bindings - Is implicit type conversion being done in code, but not in XAML?
body: <p>In a Xamarin.Forms project I'm working, I noticed we're binding a lot of integer values to label text. For example:</p>
  
  <pre><code>myLabel.SetBinding(Label.TextProperty, nameof(MyViewModel.TotalQty));
  </code></pre>
  
  <p>Where <code>MyViewModel.TotalQty</code> is an <code>int</code>.</p>
  
  <p><a href="https://developer.xamarin.com/guides/xamarin-forms/xaml/xaml-basics/data_binding_basics/" rel="nofollow noreferrer">This article from the Xamarin guide</a> says:</p>
  
  <blockquote>
    <p>In Xamarin.Forms, bindings do not perform any implicit type conversions, and if you need to display a non-string object as a string you must provide a type converter or use StringFormat.</p>
  </blockquote>
  
  <p>But the code I'm using is working, so there's obviously implicit type conversion going on there. So my conclusion is that either the statement in the article is wrong/outdated, or the statement applies to XAML, but not code. I'm having trouble finding an answer on this online - does anyone know?</p>