【发布时间】:2013-01-30 19:54:19
【问题描述】:
我有这些枚举:
private enum FontSizeType
{
XSmall, //9
Small, //12
Medium, //18
Large, //24
XLarge, //36
XXLarge //47
}
private enum AlignOptions
{
Left,
Center,
Right
}
private enum ValueType
{
Text,
Barcode
}
Resharper 的检查告诉我所有这些“枚举成员 'XSmall' [etc.] 从未使用过”
但我在组合框中使用它们,如下所示:
comboBoxType1.DataSource = Enum.GetNames(typeof(ValueType));
...那么为什么 Resharper 会被愚弄呢?还是这样?
【问题讨论】:
-
Resharper 没有“看到”
FontSizeType.XSmall(等...)的直接用法,因为您正在对 whole 枚举进行数据绑定。
标签: combobox enums resharper datasource automated-refactoring