c# call method
// Call method using 'static':
class ClassA
{
static void Main(string[] args)
{
ClassB.Method1();
}
}
class ClassB
{
public static void Method1()
{
// do something...
}
}
// Call method using an object:
class ClassC
{
static void Main(string[] args)
{
ClassD loadMethod = new ClassD();
loadMethod.Method1();
}
}
class ClassD
{
public void Method1()
{
// do something...
}
}