无法访问静态属性/字段(C#)

无法访问静态属性/字段(C#),c#,static-members,C#,Static Members,我得到一个编译时异常,它声明: Actor.TimeScale.get' cannot be accessed with an instance reference; qualify it with a type name instead. 这是代码,已清理为仅相关行: class Actor { static float _timeScale = 1.0f; public static float TimeScale { get { ret

我得到一个编译时异常,它声明:

Actor.TimeScale.get' cannot be accessed with an instance reference; 
qualify it with a type name instead.    
这是代码,已清理为仅相关行:

class Actor
{
    static float _timeScale = 1.0f;

    public static float TimeScale
    {
        get { return _timeScale; }
        set { _timeScale = value; }
    }
}
class Game1
{
    private void BeginLevel()
    {
        Actor.TimeScale = 0.3f;
    }
}

现在,我知道static有点问题,但我不明白是什么。

一个儿童级的演员有:

this.TimeScale;

当然,这对static不太好。

你有没有可能在
Game1
中有一个名为
Actor
的属性?代码对我来说很好。你能发布一个复制这个错误的完整代码示例吗?你有没有
Game1
中的
Actor
成员?我想我最后不得不上传整个解决方案。Actor有130行,game1有400行,但可以扩展到许多其他类。@sdiguana:如果替换
Actor.TimeScale=0.3f
全局::Your.Actor.Namespace.Actor.TimeScale=0.3f错误是否消失?(请确保将“Your.Actor.Namespace”替换为
Actor
所在的命名空间)^用户错误,未充分注意调试窗口指向的类。(脸掌)