how to call method of another class in c# code example
Example 1: c# how to call methods from another class
public class AllMethods
{
public static void Method2()
{
// code here
}
}
class Caller
{
public static void Main(string[] args)
{
AllMethods.Method2();
}
}
Example 2: how to call a method from a class C#
classname.methodname();