在主函数中有 如下:
private frmCallReport frmCallReport ;
                
this.frmCallReport = new frmCallReport();
this.frmCallReport.MdiParent = this;在其他文件中有类的定义:
  public partial class frmCallReport : Form
    {     
      public frmCallReport()
      {
         InitializeComponent();
        }
     }请教各位 关于这句 private frmCallReport frmCallReport; 什么意思?
语法上有什么详细的说明??类名的重复定义?

解决方案 »

  1.   

    这种定义变量个人认为不大好
    private frmCallReport frmCallReport ;
    红色的是窗体类名,后面是定义一个窗体对象private FrmCallReport frmCallReport ;
    这样你就明白了 public partial class FrmCallReport : Form
        {     
          public frmCallReport()
          {
             InitializeComponent();
            }
         }
      

  2.   

    private frmCallReport frmCallReport; 这是定义了一个 名叫 frmCallReport 的变量, 不过这个变量跟你的窗体类名一样,编译会报错。
      

  3.   

    和private Form1 f1类似,只不过你那段代码里类名和引用名一样了而已。