I’m refactoring some code and adding a method which will replace a (soon-to-be) deprecated method. The new method has the following signature:
FooResult Foo
This kind of depends on your tooling and how you feel about your tooling (resharper, fxcops and the like). Some static code analysis tools accept this:
throw new ArgumentNullException(“args.Property...”,"args");
and reject this
throw new ArgumentNullException(“args.Property...”,"args.Property");
So if you want to use the tooling, then assertions of null-hood against a parameter property must throw an ArgumentException
It's also valid to just make it up as you go along. What ever communicates the right message to the maintenance developer to help him pass the parameters correctly is the correct message.