title: C# Jagged Array check if value exists/true
body: <p>This is my code , i am using 2 dimension array . </p>
  
  <pre><code>top = 0;
  if(rowcol[i-1][j]){ top = rowcol[i-1][j] }
  </code></pre>
  
  <p>But it shows this error :</p>
  
  <p>Cannot implicitly convert type 'string' to 'bool'   </p>
  
  <p>Full code : </p>
  
  <pre><code> string[] fileData = File.ReadAllLines(@"C:\Users\apr13mpsip\Desktop\OneOrganizer\OneOrganizer\WordPuzzle\testing.txt");
  
          string[] lineValues;
  
          int row = 0;
          int col;
  
          string[][] rowcol = new string[fileData.Length][];
  
          foreach (string line in fileData)
          {
              lineValues = line.Split(new string[] { "," }, StringSplitOptions.None);
  
  
              rowcol[row] = new string[lineValues.Length];
  
              col = 0;
  
              foreach (string value in lineValues)
              {
                  rowcol[row][col] = value;
                  col++;
              }
              row++;
  
          }
  
  
          for (int i = 0; i &lt; rowcol.GetLength(0) ; i++)
          {
              for (int j = 0; j &lt; rowcol[i].GetLength(0) ; j++)
              {
  
  
                  int iadd =  i+1 &lt;rowcol.GetLength(0) ? i + 1: 0;
                  int iminus =   i-1&gt; 0  ? i - 1 : 0;
                  int jadd =  j+1 &lt;rowcol.GetLength(0) ? j + 1 : 0;
                  int jminus = j-1 &gt; 0 ? j - 1 : 0;
                  var self = rowcol[i][j]; // current value
  
                  top = 0;
  if(rowcol[iminus][j]){ top = rowcol[iminus][j] } // ERROR HERE
  }
  }
  </code></pre>
  
  <p>i am actually reading from a textfile and creating something out of it by creating rows and cols 10x10 in a jagged array. so i could find their value by rowcol[][] .</p>