Код: Выделить всё
public partial class MyForm : Form
{
public MyForm()
{
Method1();
Method2();
Method3();
//or
OtherClass.Method1();
OtherClass.Method2();
OtherClass.Method3();
}
public static void Method1(object obj1, object obj2, ...)
{
//do stuff
}
public static void Method2()
{
//do stuff
}
public static void Method3()
{
//do stuff
}
}
public static class OtherClass
{
public static void Method1(object obj1, object obj2, ...)
{
//do stuff
}
public static void Method2()
{
//do stuff
}
public static void Method3()
{
//do stuff
}
}
Подробнее здесь: https://stackoverflow.com/questions/798 ... alled-from
Мобильная версия