C#中 非静态字段,方法或属性“XXXX”要求对象引用,如何解决

如题所述

第1个回答  2017-04-25
public class A
{
public void a()
{}
}
引用时:
A myA = new A(); //对象引用,必须声明实例
myA.a();
相似回答