title: How do I cast an object to an int in a Converter?
body: <p>I give up, how do I cast this?</p>
  
  <pre><code>class AmountIsTooHighConverter : IValueConverter
  {
      public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
      {
          //int amount = (int)value;
          //int amount = (int)(string)value;
          //int amount = (int)(value.ToString);
          //int amount = Int32.Parse(value);
          //int amount = (int)Convert.ChangeType(value, typeof(int));
          //int amount = Convert.ToInt32(value);
          if (amount &gt;= 35)
          {
              return true;
          }
          else
          {
              return false;
          }
      }
  
      public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
      {
          return null;
      }
  }
  </code></pre>