title: Fixing error: cannot reference a type through an expression
body: <p>I'm developing a game. I want to have game entities each have their own <code>Damage()</code> function. When called, they will calculate how much damage they want to do:</p>
  
  <pre><code>public class CombatantGameModel : GameObjectModel
  {
      public int Health { get; set; }
  
      /// &lt;summary&gt;
      /// If the attack hits, how much damage does it do?
      /// &lt;/summary&gt;
      /// &lt;param name="randomSample"&gt;A random value from [0 .. 1]. Use to introduce randomness in the attack's damage.&lt;/param&gt;
      /// &lt;returns&gt;The amount of damage the attack does&lt;/returns&gt;
      public delegate int Damage(float randomSample);
  
      public CombatantGameModel(GameObjectController controller) : base(controller) {}
  }
  
  public class CombatantGameObject : GameObjectController
  {
      private new readonly CombatantGameModel model;
      public new virtual CombatantGameModel Model
      {
          get { return model; }
      }
  
      public CombatantGameObject()
      {
          model = new CombatantGameModel(this);
      }
  }
  </code></pre>
  
  <p>However, when I try to call that method, I get a compiler error:</p>
  
  <pre><code>    /// &lt;summary&gt;
      /// Calculates the results of an attack, and directly updates the GameObjects involved.
      /// &lt;/summary&gt;
      /// &lt;param name="attacker"&gt;The aggressor GameObject&lt;/param&gt;
      /// &lt;param name="victim"&gt;The GameObject under assault&lt;/param&gt;
      public void ComputeAttackUpdate(CombatantGameObject attacker, CombatantGameObject victim)
      {
          if (worldQuery.IsColliding(attacker, victim, false))
          {
              victim.Model.Health -= attacker.Model.Damage((float) rand.NextDouble()); // error here
              Debug.WriteLine(String.Format("{0} hits {1} for {2} damage", attacker, victim, attackTraits.Damage));
          }
      }
  </code></pre>
  
  <p>The error is:</p>
  
  <blockquote>
    <p>'Damage': cannot reference a type
    through an expression; try
    'HWAlphaRelease.GameObject.CombatantGameModel.Damage'
    instead</p>
  </blockquote>
  
  <p>What am I doing wrong?</p>