title: c# Sqlcommand error
body: <pre><code>foreach (string str in TestWords)
  {
    //spam
    SqlCommand cmd6 = new SqlCommand("select count from keys,files,folders where keys.fileid=files.id and keys.kname='" + str + "' and files.spam=1 and folders.id&lt;&gt;" + FolIter + " and files.folderid&lt;&gt;" + FolIter + " and files.id='" + s[0].ToString + "'", cn);
    int i6 = Convert.ToInt16(cmd6.ExecuteScalar());
    double temp = Convert.ToDouble((i6 + 1) / (i7 + i8));
    //non spam
  
    **error**
  
    SqlCommand cmd9 = new SqlCommand("select count from keys,files,folders where keys.fileid=files.id and keys.kname='" 
      + str 
      + "' and files.spam=0 and folders.id&lt;&gt;"
      + FolIter
      + " and files.folderid&lt;&gt;" 
      + FolIter 
      + " and files.id='" 
      + s[0].ToString 
      + "'", cn);
    int i9 = Convert.ToInt16(cmd9.ExecuteScalar());
    temp2 = Convert.ToDouble((i9 + 1) / (i7 + i8));
    Sdoc = Convert.ToDouble(Sdoc * temp);
    NsDoc = Convert.ToDouble(NsDoc * temp2);
  }
  </code></pre>
  
  <p>The error iam getting is:<strong>Operator '+' cannot be applied to operands of type 'string' and 'method group'</strong> </p>