class A { public:void static Method() { System.Console.WriteLine("I'm the class A 's static Method"); } } class { pubcli:Method() { A.Method(); } } 静态public函数可以直接调用不必构建对象
class A { public:void static Method() { System.Console.WriteLine("I'm the class A 's static Method"); } } class B { pubcli:void Method() { A.Method(); } } 静态public函数可以直接调用不必构建对象
{
public:void static Method()
{
System.Console.WriteLine("I'm the class A 's static Method");
}
}
class
{
pubcli:Method()
{
A.Method();
}
}
静态public函数可以直接调用不必构建对象
{
public:void static Method()
{
System.Console.WriteLine("I'm the class A 's static Method");
}
}
class B
{
pubcli:void Method()
{
A.Method();
}
}
静态public函数可以直接调用不必构建对象