I have two files:
public class Tester
{
public static void Main()
{
Program begin = new Program();
begin.StartCalculator();
}
}
AND
public class Program
{
public void StartCalculator()
{
System.Console.WriteLine("Hello world");
}
}
This works, but when I change the body of Main() to simply:
StartCalculator();
and make the StartCalculator() method static, I get:
The name 'StartCalculator' does not exist in the current context
What does that mean, and why must I call the method on an object for the
program to run?