title: Change MS Excel Row Colour in Excel using C#
body: <p>I am currently creating a small program that will allow a user to input data into a windows form. Once this data has been input into the form it will then be added to a Excel Document using OleDb.</p>
  
  <p>I have no problems with the above section and I can input data no bother however my problem comes when I try to change the colour of the Excel Row.</p>
  
  <p>I am looking to change the colour of the row to red if the row currently has no fill.</p>
  
  <p>The code I am currently using:</p>
  
  <pre><code>        Excel.Application application = new Excel.Application();
          Excel.Workbook workbook = application.Workbooks.Open(@"C:\Users\jhughes\Desktop\ScreenUpdate.xls");
          Excel.Worksheet worksheet = (Excel.Worksheet)workbook.Sheets["DailyWork"];
          Excel.Range usedRange = worksheet.UsedRange;
          Excel.Range rows = usedRange.Rows;
          try
          {
              foreach (Excel.Range row in rows)
              {
                if (row.Cells.EntireRow.Interior.ColorIndex = 0)
                {
                   row.Interior.Color = System.Drawing.Color.Red;
                }
              }
          }
          catch(Exception ex)
          {
              MessageBox.Show(ex.ToString());
          }
  </code></pre>
  
  <p>I am getting the error "Cannot implicitly convert type int to bool" at the line "If(row.Cells.EntireRow....)"</p>