title: simple cast from interface method result to integer
body: <p>I have interface IBookRepository. That interface has method CountAllBooks() which returns integer. 
  If I inside method receiving value of type object </p>
  
  <pre><code>public object Convert(object value)
  </code></pre>
  
  <p>and if that passed object is of type IBookRepository why I cannot cast it's CountAllBooks result as integer like</p>
  
  <pre><code>public object Convert(object value)
  {
     int c;
     if(value is IBookRepository)
     {
        c = (int)value.CountAllBooks();
     }
  }
  </code></pre>