Possible Duplicate:
Call non-static method from static method c#
We can call non-static method from static method creating instance. Code:
public class Foo
{
public void Data1()
{
}
public static void Data2()
{
Foo foo = new Foo();
foo.Data1();
}
}
However, I heard that non-static method can be called from static method with the help of delegate. is it true? If yes, then how? Please guide me with sample code. Thanks.
To call a non static method you need an instance of the object - there is no way around that.