The Main() method is where program execution begins. The VisitPlanets() method need not be included inside of the Main() method. You could do this for example:
using System;
namespace Examples
{
class Program
{
static void VisitPlanets()
{
Console.WriteLine("Hi there.");
}
static void Main(string[] args)
{
VisitPlanets();
}
}
}
As you progress through C#, you’ll learn how to access methods, classes, etc. that are not inside of the Main() method. They may even be in totally separate files from the main method.
Thanks for the reply. Really appreciate it. Now, to say it clear. There is no need to do it. But right now it’s the only way to get a method to run we know.