title: How to use the Strategy Pattern with C#?
body: <p>Here's what I have so far:</p>
  
  <pre><code>namespace Strategy
  {
      interface IWeaponBehavior
      {
          void UseWeapon();
      }
  }
  
  namespace Strategy
  {
      class Knife : IWeaponBehavior
      {
          public void UseWeapon()
          {
              Console.WriteLine("You used the knife to slash the enemy! SLASH SLASH!");
          }
      }
  }
  
  namespace Strategy
  {
      class Pan : IWeaponBehavior
      {
          public void UseWeapon()
          {
              Console.WriteLine("You use the pan! 100% Adamantium power! BONG!");
          }
      }
  }
  </code></pre>
  
  <p>Now if I have a Character.cs superclass. how can that superclass implement a weaponbehavior so that children classes can be more specific.</p>
  
  <pre><code>namespace Strategy
  {
      class Character
      {
          public IWeaponBehavior weapon;
  
          public Character(IWeaponBehavior specificWeapon)
          {
              weapon = specificWeapon;
          }        
      }
  }
  
  namespace Strategy
  {
      class Thief : Character
      {
  
      }
  }
  </code></pre>
  
  <p>How can I implement this? I'm very confused on what the actual code needs to be.</p>
  
  <p>I know this might be asking too much, but if you could write the actual code so I could study it, that would be very nice of you guys. I learn by seeing code. :P Many people could benefit from this question.</p>