finding the index of a value in a multi dimentional array of doubles


im having trouble writing function index of value in multi dimentional array. value in [*,0] need check column 0 value. have far:

public int locate(double[,] arr, double value)          {              int w = arr.getlength(0);              (int x = 0; x < w; x++)              {                  if (arr[x, 0].equals(value))                  {                      return x;                  }                      return -1;              }          }

arr double array large range of distinct values, , value double looking in arr[*,0].

this give me error saying not code paths return value. wrong code , how fix it?

change to:

        public int locate(double[,] arr, double value)         {             int w = arr.getlength(0);             (int x = 0; x < w; x++)             {                 if (arr[x, 0].equals(value))                 {                     return x;                 }                                }             return -1;         }


mitja



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

SQL Server 2008 - High Memory Usage

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts

Problem In Configuring Biztalk 2009 In Creating A ReceivePort.When I Try To Create A Receive POrt I Got This Error