How to make method call another one in classes?
问题 Now I have two classes allmethods.cs and caller.cs . I have some methods in class allmethods.cs . I want to write code in caller.cs in order to call a certain method in the allmethods class. Example on code: public class allmethods public static void Method1() { // Method1 } public static void Method2() { // Method2 } class caller { public static void Main(string[] args) { // I want to write a code here to call Method2 for example from allmethods Class } } How can I achieve that? 回答1: Because