<分区>
Possible Duplicate:
C#.NET - Why do members of a static class need to be declared as static? Why isn't it just implicit?
我遇到了一个有趣的错误,当我从一个静态声明的类中调用一个方法(我没有明确声明为静态的)时,我收到一条消息说
An object reference is required for the non-static field, method, or property 'MangoTree.Twitter.OAuthClient.PerformRequest(System.Collections.Generic.Dictionary, string, string, string, MangoTree.Twitter.OAuthClient.RequestType)'
当我将方法显式声明为静态时,错误消失了,我可以从类声明中删除静态修饰符,错误就消失了。让我感到困惑的是,我的印象是当我将类声明为静态时,类中的所有内容也应该自动为静态,而无需我明确声明。