功能代码写后,控件不显示内容,产生这个问题 都有什么原因呢? 本人菜鸟,请大侠们指点一二。

解决方案 »

  1.   

    if (projectForm != null)
                {
                    string projectPath = projectForm.ProjectPath + "\\基本参数";
                    string[] tempFiles = Directory.GetFiles(projectPath);
                    if (tempFiles != null)
                    {
                        for (int i = 0; i < tempFiles.Length; i++)
                        {
                            string tempfilename = tempFiles[i];
                            tempfilename = tempfilename.Substring(tempfilename.LastIndexOf("\\") + 1);
                            tempfilename = tempfilename.Substring(0, tempfilename.Length - 4);
                            BaseParascomboBoxEx1.Items.Add(tempfilename);
                        }
                    }
      

  2.   

    加断点  看看tempfilename Substring 之后是什么
      

  3.   

    为什么现在结贴率都这么低呢
    http://topic.csdn.net/u/20100903/17/dfafa096-7529-4c66-b39f-25320fb3580a.html
    如果是add应该是没问题的
    如果是datatable,那绑定以后不要释放掉