• λ我爱Aspx >> C#.Net >> out 数组总是提示有些路竟没有赋值
  • out 数组总是提示有些路竟没有赋值

  • :aspxer  Դ:csdn  :2007-6-12 3:43:37  ؼ:
  • {

    stepArray[i] = step;

    step -= stepWidth;

    ++i;

    }

    stepArray[i] = stopWavelength;

    }

    else

    {

    stepArray = new double[0];

    throw new Exception("The value between start and stop is less than step width.");

    }

    }

    else

    {

    stepArray = new double[0];

    throw new Exception("The start and stop point are equal");

    }

    }

    第2楼. 由 Nick_Nick 于 2007-6-7 11:31:19 发表

    out的参数可能传进来的是null

    所以你要先new一个

    如果你传进来的事已经new好的数组,用ref代替out

    第3楼. 由 paulbin 于 2007-6-7 11:38:09 发表

    但是我不确定数组的大小

    怎么new呢

    第4楼. 由 Nick_Nick 于 2007-6-7 11:40:32 发表

    2003用arraylist,2005用list<T>

    第5楼. 由 paulbin 于 2007-6-7 11:40:57 发表

    private void CalculateSteps( int startWavelength, int stopWavelength, int stepWidth, out int[] stepArray )

    {

    int i = 0, remainder = 0, quotient = 0;

    Ҷƪл˵?
  • һƪ高薪诚聘有经验的PHP程序员(深圳)
    һƪ在google上面搜到下面的微软的地址,可是看不了