Use it or lose it, part deux [New Delay.FxCop code analysis rule helps identify uncalled public or private methods and properties in a .NET assembly]

This blog has moved to a new location and comments have been disabled.

All old posts, new posts, and comments can be found on The blog of

See you there!

Comments (2)
  1. Daniel Rose says:

    Here's one use case which will be difficult to check:

    I use the Cinch MVVM framework, which includes a Mediator class to pass messages. I can register for messages by adding an attribute to a method which will handle the message and simply registering the class itself with the Mediator. It then looks for methods with that attribute (via Reflection), keeps an internal list, and calls the method when the corresponding message is sent.

    So if that message is never sent, then that method is unused…

  2. David Anson says:

    Daniel Rose,

    Agreed. 🙂 This scenario actually seems pretty similar to the XAML binding scenario: there are hints about a method's nature if you know the right place to look and there are ways to figure out such a method is called if you're willing to do a bunch of additional work.

Comments are closed.