为什么此部分代码不运行并显示消息“无法使用实例引用访问,而是使用类型名称来限定它”?请给我解释一下。
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
}
public class Report //my public class
{
public static double[] KwotaZ = new double[10];
public static double[] KwotaNa = new double[10];
public static string[] WalutaNa = new string[10];
public static string[] WalutaZ = new string[10];
public static int IlOperacji = 0;
}
private void button1_Click(object sender, EventArgs e)
{
Report raport2 = new Report(); //create new object class Report
raport2.KwotaZ[raport2.IlOperacji] = 213.3; //this wrong part code why???
Konwerter();
}
}
}