title: VS IntelliSense - IFluentInterface / IHideObjectMembers trick does not work. Why?
body: <p><a href="http://blogs.clariusconsulting.net/kzu/how-to-hide-system-object-members-from-your-interfaces/" rel="noreferrer">The <code>IHideObjectMembers</code> trick</a> (a.k.a <code>IFluentInterface</code>) can be used e.g. in fluent interface implementations to hide <code>System.Object</code> members from IntelliSense. (If you don't know this trick, you can read up on it via the above link; I'm just repeating the interface's usual declaration here:)</p>
  <pre class="lang-cs prettyprint-override"><code>using System;
  using System.ComponentModel;
  
  [EditorBrowsable(EditorBrowsableState.Never)]
  public interface IHideObjectMembers
  {
      [EditorBrowsable(EditorBrowsableState.Never)] bool Equals(object obj);
      [EditorBrowsable(EditorBrowsableState.Never)] int GetHashCode();
      [EditorBrowsable(EditorBrowsableState.Never)] Type GetType();
      [EditorBrowsable(EditorBrowsableState.Never)] string ToString();
  }
  </code></pre>
  <p>I'm now supposed to be able to hide <code>System.Object</code> members on another type as follows:</p>
  <pre class="lang-cs prettyprint-override"><code>public class SomeClass : IHideObjectMembers { ... }
  </code></pre>
  <p>or:</p>
  <pre class="lang-cs prettyprint-override"><code>public interface ISomeInterface : IHideObjectMembers { ... }
  </code></pre>
  <p>I tried this in both VS 2008 Express and VS 2008 Standard. However, no members are hidden from IntelliSense at all. I have used the <code>EditorBrowsableAttribute</code> in different projects and it always worked well; however, it doesn't work in this particular scenario.</p>
  <p><a href="https://i.stack.imgur.com/rr4na.png" rel="noreferrer"><img src="https://i.stack.imgur.com/rr4na.png" alt="" /></a></p>
  
  <p>If things had worked as expected, I would only have seen the <code>SomeMethodTwo</code> method.</p>
  <p>Am I missing something?</p>
  <hr />
  <p><strong>P.S.:</strong> You can infer my example code from the declarations and the screenshot. I have a class <code>SomeClass</code> with a single dummy method called <code>SomeMethodTwo</code>. Very simple. I have <em>not</em> re-implemented the four <code>System.Object</code> methods in this class, as this should not be necessary.</p>