I have a C# console app with a static main method.
I want to be able to call a non-static method in main but cannot.
I believe I need to keep main static but I also want to run non-static methods within the program?
The statement below says an object reference is required.
c1 = new Class1()
Where / how do I instantiate non-static objects in this program?
Thanks
namespace VER
{
class Example
{
private Dictionary<string, long> dStrLong;
Class1 c1;
static void Main(string[] args)
{
c1 = new Class1();
}
}
}