hi,
my code gies like this.
class Testprogram
{
public void callmethod()
{
Console.WriteLine("hello wrotld");
}
static void Main()
{
Testprogram t= new Testprogram();
t.callmethod();
Console.ReadLine();
}
}
now i want to execute with the below code instead of creating object.
static void Main()
{
new Testprogram(callmethod());
Console.ReadLine();
}
Is it possible to do so?.
Thank you.