【发布时间】:2014-07-13 12:06:52
【问题描述】:
internal class Configuration
{
public static double CurrentFrameRate = 23.976;
public static string ListViewLineSeparatorString = "<br />";
private void test()
{
// Not accessible here
this.CurrentFrameRate = 30;
}
}
class main
{
// this would work just fine
private void Test()
{
Configuration.CurrentFrameRate = 23.976;
}
}
我的问题是为什么静态可以在使用实例的其他类中访问,但不能在创建它的类中访问?
【问题讨论】: