问题没解决,贴子不能结,要扣信誉分怎么办?怎么办?积分回收器来帮忙。http://expert.csdn.net/Expert/topic/2871/2871831.xml?temp=.4999201

解决方案 »

  1.   

    StringBuilder是一个类,类总是通过引用传递参数,所以不需要加out。
      

  2.   

    使用out 参数必须由接受方为其赋值,即在函数内部必须为他的参数赋值。
    原型:int rd_asc(unsigned char* buff) 内部肯定是没有这样做的。所以发生错误你使用ref 代替 out即可例如:
    using System; 
    class TestOut 
    {
       static public void FillArray(out int[] myArray) 
       {
          // Initialize the array:
          myArray = new int[5] {1, 2, 3, 4, 5};
       }   static public void Main() 
       {
          int[] myArray; // Initialization is not required      // Pass the array to the callee using out:
          FillArray(out myArray);      // Display the array elements:
          Console.WriteLine("Array elements are:");
          for (int i=0; i < myArray.Length; i++)
             Console.WriteLine(myArray[i]);
       }
    }
      

  3.   

    输出参数是从被调用的方法向调用它的方法传递的函数——也就是相反方向。输出参数是通过out来指定的,总是按引用传递并且不需要初始化。
    例如:
    void GetBack(out boolean isGetBack)
    {
    isGetBack=true;
    }
      

  4.   

    原因很明了:buff不能按引用传递出来。