Export (0) Print
Expand All

Verification Results Dialog Box 

This dialog box appears when the refactoring engine detects compile errors or rebinding issues, during the verification process of refactoring.

Verification Results

Identifies the statements that would contain compile errors or rebinding issues as a result of a refactoring operation.

Preview Issues

Shows a preview of the reference changes (or refactored code) that would introduce compile errors or rebinding issues in your program.

Remarks

This dialog box will not appear in the following circumstances:

  • Your code generates unresolved compile errors before starting a refactoring operation and no rebinding issues are introduced as a result of the refactoring operation.

  • You clear all references in the Preview Changes dialog box.

  • You click Yes when prompted with a warning dialog box that indicates that a naming conflict exists and that the refactoring operation will skip the verification process.

Rebinding Issues

A rebinding issue occurs when a refactoring operation inadvertently causes a code reference to bind to something different from what it was originally bound to. The Verification Results dialog box distinguishes the difference between two kinds of rebinding issues.

References whose definition will no longer be the renamed symbol

This kind of rebinding issue occurs when a reference no longer refers to a renamed symbol. For example, consider the following code:

    class Example
    {
    private int a;
        public Example(int b)
        {
            a = b;
        }
    }

If you use refactoring to rename a to b, this dialog box appears. The reference to the renamed variable a now binds to the parameter that is passed to the constructor instead of binding to the field.

References whose definition will now become the renamed symbol

This kind of rebinding issue occurs when a reference that previously did not refer to the renamed symbol now does refer to the renamed symbol. For example, consider the following code:

    class Example
    {
        private static void Method(object a)
        {
        }
        private static void OtherMethod(int a)
        {
        }
        static void Main(string[] args)
        {
            Method(5);
        }
    }

If you use refactoring to rename OtherMethod to Method, this dialog box appears. The reference in Main now refers to the overloaded method that accepts an int parameter instead of the overloaded method that accepts an object parameter.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft