【发布时间】:2013-03-01 13:04:27
【问题描述】:
代码:
public class A {
public const int beingSupportedRate = 0;
}
public partial class B : A {
public const int beingSupportedRate = 1;
}
由于性能,我希望它与 const int 一样明确。
将 virtual 放在 class A 变量 beingSupportedRate 前面会导致以下编译器错误:
The modifier 'virtual' is not valid for this item
【问题讨论】:
标签: c#