Object reference not found in Main()
Posted on 2005-04-26
When i try to build this
static void Main(string args)
string s = "C# Programming for me";
I get this error "An object reference is required for the nonstatic field, method, or property 'PigLatin.Class1.s' "
Is this because Main is a static method and cannot operate with nonstatic fields? I thought that s that i use in the WriteLine statement is the actual reference to the string object i declared at class level. So why cant it find it?