在intellisense resharper中显示枚举值

时间:2017-04-25 09:58:22

标签: c# resharper intellisense

我正在寻找一个在intellisense中显示枚举值的选项。看看图片:

enter image description here

Resharper中是否有任何选项可以让我在声明中列出上面intellisense框中的枚举值?:

public enum FieldType
{
    Text = 1,
    MultiValueSelect = 2,
    TextArea = 4,
    ...
}

2 个答案:

答案 0 :(得分:1)

不,你不能。 Visual Studio只能按字母顺序显示枚举成员 。但Resharper会覆盖此行为,并为您提供“按相关性排序”功能(默认情况下)。

解决方案:

在R#选项中将Environment -> IntelliSense -> Completion Behavior -> Sort items by参数设置为Alphabetically值。

答案 1 :(得分:0)

显示枚举值的默认方式是按字母顺序排列。

enter image description here

您正在显示的图像会覆盖默认方式。我认为这是Resharper或“Productivity Power Tools”,它就是这样展示的。

相关问题