title: Exclude interface implementation members through reflection
body: <p>I have the following Interface, and implementation:</p>
  
  <pre><code>public interface INew
  {
      string TestString { get; }
  }
  
  public class PurchaseOrder : INew
  {
      public string OrderNo { get; set; }
  
      public string TestString
      {
          get { return "This is a test string"; }
      }
  }
  </code></pre>
  
  <p>I am trying to reflect out the <code>OrderNo</code> part of the <code>PurchaseOrder</code> object, using the following code:</p>
  
  <pre><code>var props = p.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.DeclaredOnly | BindingFlags.FlattenHierarchy);
  foreach (var prop in props)
  {
      Console.WriteLine(prop.Name);
  }
  </code></pre>
  
  <p>My output is returning the <code>TestString</code> property also.  I have searched for ways to exclude implemented interface members but can only find items to include it.  Can anybody show me how i can exclude such items?</p>