You're right that the Main() method is always static and that you'd usually (but not necessarily) create an object within it.
However, this doesn't mean that you can only create objects within a static block.
As mentioned in my previoous post, you can create them virtually anywhere.
To illustrate, here's an extended version of my previous program which creates objects in several different places:
using System;
using System.Threading;
class A
{
public A()
{
Thread t = new Thread(SayHello);
t.Start();
}
public void SayHello()
{
Console.WriteLine("Hello");
}
}
class Test
{
private A a = new A();
static void Main()
{
new A();
Test t = new Test();
t.MyMethod();
Console.ReadKey();
}
void MyMethod()
{
new A();
}
}
The output should be:
Hello
Hello
Hello