title: Interface vs. concrete object return value question
body: <p>So I am trying to understand this sample code from Lynda.com without explanation.</p>
  <p>IScore.cs</p>
  <pre><code>internal interface IScore
  {
      float Score { get; set; }
      float MaximumScore { get; set; }
  }
  </code></pre>
  <p>ScoreEntity.cs</p>
  <pre><code>internal class ScoreEntity : IScore
  {
      public float Score { get; set; }
      public float MaximumScore { get;set;}
  }
  </code></pre>
  <p>ScoreUtility.cs</p>
  <pre><code>internal class ScoreUtility
  {
      public static IScore BestOfTwo(IScore as1, IScore as2)
      {
          var score1 = as1.Score / as1.MaximumScore;
          var score2 = as2.Score / as2.MaximumScore;
  
          if (score1 &gt; score2)
              return as1;
          else 
              return as2;
      }
  }
  </code></pre>
  <p>Calling code:</p>
  <pre><code> var ret = ScoreUtility.BestOfTwo(new ScoreEntity() { Score = 10, MaximumScore= 4}, 
              new ScoreEntity() {Score = 10, MaximumScore = 6});
   return;
  </code></pre>
  <p>My question is, in the ScoreUtility, what's really the benefit of using the interface type as return type in the method and argument type in the parameters, vs. just using ScoreEntity  for the return and parameters, since the method itself returns a concrete object? Is this just to make the code looked 'smart'?</p>