title: Extension Methods vs Instance Methods vs Static Class
body: <p>I'm a little bit confused about the different ways to use methods to interact with objects in C#, particularly the major design differences and consequences between the following:</p>
  
  <ol>
  <li>Invoking an instance method</li>
  <li>Using a static class on a POCO</li>
  <li>Creating an extension method</li>
  </ol>
  
  <p>Example:</p>
  
  <pre><code>public class MyPoint
  {
      public double x { get; set; }
      public double y { get; set; }
  
      public double? DistanceFrom(MyPoint p)
      {
          if (p != null)
          {
              return  Math.Sqrt(Math.Pow(this.x - p.x, 2) + Math.Pow(this.y - p.y, 2));
          }
          return null;
      }
  }
  </code></pre>
  
  <p>If you could accomplish the desired outcome by simply placing a method in a class definition, why would a POCO combined with either a static helper class or an extension method be preferable?</p>