G
Guest
Hi peeps
Ok, so I thought I'd have a go at making a console app in VS2k5... I haven't
written any windows apps for years, let alone dos apps (been web programming)
and I've hit a dumb error...
"An object reference is required for the nonstatic field, method or property
[propertyname]"
This is occuring in my main function...
public static void Main(string[] args)
{
DisplayHeader();
}
Display header is defined like so...
public void DisplayHeader()
{
Console.WriteLine("hello!");
}
What's going on - I've tried making everything static, but I get errors.
I've tried making main nonstatic, but it didn't like that either. What am I
missing? This also happens on class-wide variables as well!?
Help!
Dan
Ok, so I thought I'd have a go at making a console app in VS2k5... I haven't
written any windows apps for years, let alone dos apps (been web programming)
and I've hit a dumb error...
"An object reference is required for the nonstatic field, method or property
[propertyname]"
This is occuring in my main function...
public static void Main(string[] args)
{
DisplayHeader();
}
Display header is defined like so...
public void DisplayHeader()
{
Console.WriteLine("hello!");
}
What's going on - I've tried making everything static, but I get errors.
I've tried making main nonstatic, but it didn't like that either. What am I
missing? This also happens on class-wide variables as well!?
Help!
Dan