Hello,
This should be a simple problem to solve, but I'm fairly new to C# and
have been wracking my brains to no avail. I created a new Console
Application in C# beta 2, and entered the following:
using System;
using System.Collections.Generic;
using System.Text;
namespace Test2
{
class Program
{
static void main (string[] args)
{
string a = "qwert";
string b = GetStuff( );
string c = a + b;
Console.WriteLine(c);
}
public string GetStuff( )
{
string c = "poiuy";
return c;
}
}
}
When I compile this, I get the error: "An object reference is required
for the nonstatic field, method, or property 'Test2.Program.GetStuff( )' for
the line: string b = GetStuff( );
I'm not entirely sure what the problem could be, and would appreciate it
if someone help. Thanks.
Scott