So here's the deal, I have 2 classes at the moment (planning on adding multiple), and I get this error when i'm trying to call functions from both classes. Same namespace. I double-checked and look at my properties tab to see that it's set to compile.
using System;
namespace Game
{
public class SecondSet
{
public void SituationSecondOne()
{
Console.WriteLine(" ");
Console.WriteLine("Choices:");
Console.WriteLine("1: First");
Console.WriteLine("2: Second");
Console.WriteLine(" ");
int ChoiceOne = Convert.ToInt32(Console.ReadLine());
switch (ChoiceOne)
{
case (1):
Console.WriteLine("TEST2");
break;
case (2):
Console.WriteLine("TEST2");
break;
case (1337):
Console.WriteLine(" ");
Console.WriteLine("Thank you for playing");
Console.ReadLine();
Environment.Exit(1);
break;
default:
Console.WriteLine(" ");
Console.WriteLine("Now, let's try that again ... (¬_¬)");
SituationSecondOne();
break;
}
}
}
}
Now, when I call the function from the second to the first, I get no error. What type of Main() method do I need for this? (I also tried to add the original public void Main(string[] args), once added, I can no longer add public to the function I want to call to the first class)
NOTE: I added this to the first class
SecondSet s2 = new SecondSet();
And it works fine as the code is posted above, but I get the compile error mentioned. valve pls fix :/