调试时c#designer代码错误

时间:2014-05-01 10:58:06

标签: c#

我在VS 2013 C#中有一个解决方案,当我调试它时会引发错误,当我构建它时没有错误,它是一个可视组件错误,错误是检查“如果对象是空的......”, “即新关键字......”这里是引发错误的代码:

 public static void smethod_11()
{
    int num = 1;
    Color white1 = System.Drawing.Color.White;   
    do
    {
        Class9.panel_0[num].Controls["FnzProduct_" + Conversions.ToString(num)].BackColor = System.Drawing.Color.White;
        Class9.panel_0[num].Controls["FnzProduct_" + Conversions.ToString(num)].BackgroundImage = null;
        Class9.panel_0[num].Controls["FnzID_" + Conversions.ToString(num)].Text = string.Empty;
        Class9.panel_0[num].Controls["FnzVolume_" + Conversions.ToString(num)].Text = " ";
        Class9.panel_0[num].Controls["FnzAmount_" + Conversions.ToString(num)].Text = " ";
        Class9.panel_0[num].Controls["FnzPrice_" + Conversions.ToString(num)].Text = " ";
        Class9.panel_0[num].Controls["FnzStatus_" + Conversions.ToString(num)].BackColor = Color.Transparent;
        Class9.panel_0[num].BackColor = Color.LightSlateGray;
        Class9.panel_0[num].Show();
        Class9.gclass0_0[num].Value = 0;
        num++;
    }

这里是class9代码:

 internal static Panel[] panel_0 = new Panel[0x21];

如何纠正?

0 个答案:

没有答案