Version Used:
VS 2022 17.14.11
Steps to Reproduce:
- put this code into a .cs file
internal class ClassWithStaticMembers
{
public static int StaticInt { get; set; }
public static string StaticString { get; set; }
public static void StaticMethod()
{
Console.WriteLine(StaticString + StaticInt);
}
}
- execute
Move static members to another type... from the context menu of StaticMethod()
- do not select other members, and hit OK
- observe that the method in the created file looks like this
public static void StaticMethod()
{
Console.WriteLine(StaticString + StaticInt);
}
instead of this
public static void StaticMethod()
{
Console.WriteLine(ClassWithStaticMembers.StaticString + ClassWithStaticMembers.StaticInt);
}
Expected Behavior:
references to static members in the source class that are not moved should now be qualified with the identifier of the source class
Actual Behavior:
references to static members are not qualified, yielding uncompiling code.