Hello im trying to call a method in a different class so when the user selects the button 1 it will call the
It says no overload for method myMethod takes 0 arguments
using System;
namespace crap
{
class firstClass
{
public static void Main (string[] args)
{
int choice = 0;
while (choice != 1 || choice != 2) {
Console.WriteLine ("Press 1 for choice 1 or 2 for choice for choice 2");
choice = Convert.ToInt32 (Console.ReadLine ());
if (choice == 1) {
crap.secondClass.myMethod();
}
if (choice == 2) {
}
}
}
}
public class secondClass{
public static void myMethod(int later, int later2)
{
Console.WriteLine("You chose option 1");
}
}
}