I'm trying to create a console application with C# and there's something that I obviously don't understand. I've added a class file (.cs) and put one method in it but I can't seem to reference it from the main function in the Program class. The class name is Class1. I can't instantiate a Class1 object instance. Why not?
C#:
namespace ConsoleApp1
{
class Program
{
Class1 Tasks;
static void Main(string[] args)
{
int retval = 0;
int pause = 0;
Tasks = new Class1(); // an error here, object reference.
}
}
}