The Change Signature refactoring combines several different modifications that can be made to signatures of methods, constructors, properties, and indexers.
The refactoring perform the following modifications:
Along with changing the signature itself, ReSharper searches for all usages of the method, property, constructor, or indexer and alters all calls, implementations and overridings that can be safely modified to reflect the change.
Warning Changing a return type or a parameter type may cause errors which you will need to correct manually in the code.
The refactoring is also applicable to type constructors and indexers (only you cannot change their names or return types).
Note If you select a method that overrides or implements some other methods, you will see a question box asking whether you want to modify the base methods. Click Yes if you want to change the base methods. Click No if you want to change only the selected method without modifying the base ones.
The Change Signature dialog box opens.

If you add a new parameter, you need to specify its type, name, and default value that will be used to update existing method calls.
For example, if you add to the method a new parameter with the default value "1", refactoring is applied as shown in the table below.
| Before | After |
|---|---|
public class SampleClass
{
public void Foo(int a)
{
...
}
public void CallFoo()
{
Foo(0);
}
}
|
public class SampleClass
{
public void Foo(int a, int b)
{
...
}
public void CallFoo()
{
Foo(0,1);
}
}
|
For example, if you add to the method a new parameter with the default value "1" to the method, refactoring is applied as follows.
| Before | After |
|---|---|
public class SampleClass
{
public void Foo(int a)
{
...
}
public void CallFoo()
{
Foo(0);
}
}
|
public class SampleClass
{
public void Foo(int a)
{
Foo(a, 1);
}
public void Foo(int a, int b)
{
...
}
public void CallFoo()
{
Foo(0);
}
}
|
Note If you changed some parameter type or a return type to a type not used in the current namespace or to a type that can be resolved ambiguously, ReSharper suggests you to select the type and its full name in the devoted dialog box.

If no conflicts are found, the changes are applied immediately.