Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/260.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在Resharper中强制静态方法的冗余名称限定符_C#_Resharper - Fatal编程技术网

C# 在Resharper中强制静态方法的冗余名称限定符

C# 在Resharper中强制静态方法的冗余名称限定符,c#,resharper,C#,Resharper,我知道我可以强制使用Resharper代码清理的实例成员使用“this.”限定符 我可以强制静态方法使用冗余名称限定符吗 public class Foo { public void Bar() { StaticMethod(); } private static void StaticMethod() { } } 将被迫这样做: public class Foo { public void Bar() {

我知道我可以强制使用Resharper代码清理的实例成员使用“this.”限定符

我可以强制静态方法使用冗余名称限定符吗

public class Foo
{
    public void Bar()
    {
        StaticMethod();
    }

    private static void StaticMethod()
    {

    }
}
将被迫这样做:

public class Foo
{
    public void Bar()
    {
        Foo.StaticMethod();
    }

    private static void StaticMethod()
    {

    }
}

我在ReSharper 5.x中没有看到任何方法可以做到这一点,在6.x EAP/Beta版本中也没有看到任何方法,但是没有6.x的实例可以验证


你可以在JetBrains的问题跟踪器中建议它作为一项功能:

发布为。如果你需要的话,请投它一票。根据追踪者的说法,这在v8中是固定的,但我在v10中找不到任何与之相关的选项。。。