title: Refactor my code : Avoiding casting in derived class
body: <p>Firstly, I feel sorry about the title, I do not know how to describe my problem exactly. I hope it will be better explained through the code.</p>
  
  <pre><code>public abstract class AB {
    public MyModel Model;
  }
  
  public class A : AB {
    public A() {
      Model = new MyModelA();
    }
  
    public void AMethod() {
      var model = (MyModelA) model; // I have to do this all place
    }
  
    public void AnotherMethod() {
      var model = (MyModelA) model; // same here
      model.NewInt = 123;
    }
  }
  
  public abstract class MyModel {
  
  }
  
  public class MyModelA : MyModel {
    // new properties
    public int NewInt {get;set;}
  }
  </code></pre>
  
  <p>Take a look at the code, in order to use new properties from derived class, I have to do a cast but it is ugly when I have to use it same time all over places. </p>
  
  <p>The method I think is declare another property: <code>public MyModelA _tmp</code> then I cast it in the constructor <code>_tmp = (MyModelA) Model</code> and use it instead of Model.</p>
  
  <p>Are there any other appropriate ways to do this ?
  Thanks !</p>