Use of unassigned out parameter, c#

后端 未结 4 641
借酒劲吻你
借酒劲吻你 2020-12-29 01:06

I have very simple problem. I made a very simple function for you to demonstrate my problem.

static void Main(string[] args)       
{
    double[,] mydouble          


        
4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-29 01:41

    You are assigning values to the elements of your array parameter, but you have to assign y value to the array itself because its defined as out:

    d =  new double[1, 4];
    

提交回复
热议问题