This project is read-only.


Rename parameter and argument exceptions


Several ArgumentException classes include constructors with a parameter named paramName. When a method parameter is renamed inline, it would be helpful if the strings passed for these arguments were examined and treated as a reference to the parameter during the rename operation, if and only if all of the following conditions are met.
  1. The string is a literal string passed as an argument to the paramName method.
  2. The string exactly matches the name of the parameter, including case-sensitivity and whitespace.
Note that the operation needs to pay particular attention to identifiers which use the @ prefix, since the prefix would not (and should not) appear in the string literal.


Pilchie wrote Jul 24, 2014 at 5:27 PM

We are not planning on implementing this directly in the rename refactoring. However, their is a proposed "nameof" language feature that we are hoping to implement that would allow you to refer to the parameter semantically and rename will work with that.