Remove the static keyword on Main and rewrite the Program Class?
Like this.
public class MyClass
{
public string GetString()
{
return "Hello World";
}
}
class Program
{
void Main (string[] args)
{
MyClass myObj = null;
Console.WriteLine(myObj.GetString());
}
public static void Main()
{
MyClass myObj = new MyClass();
Console.WriteLine(myObj.GetString());
}
}
Seriously though, there is no anchor to reality in this question and normally i wouldnt answer but i cant help it (I wanna play the game).
Anywho, I did not change anything
INSIDE the main method,at least not within its scope.