How to hide System.Object members from your interfaces

Sometimes, System.Object methods (Equals, GetHashCode, GetType and ToString) only contribute clutter to VS intellisense. Everyone knows those members are always there, yet they are seldom used explicitly. This is especially important (and annoying) for fluent APIs that define the flow of invocations in terms of interfaces and usually have few members at each "step" of the statement.

For example, in the following Moq expectation, at the particular step in the statement, there are only two "real" invocations that make sense. However, they are obscured by the ...

Read full article

Published 10 March 2008 03:00 PM by Daniel Cazzulino
Filed under: ,

Comments

No Comments

Search

Go

This Blog

News

     

      Microsoft MVP Profile

Syndication