title: 'System.Data.SqlClient.SqlCommand.SqlCommand(string, System.Data.SqlClient.SqlConnection)' has some invalid arguments
body: <p>Please help me out, I have written entire connection string in separate Class "DbConnection"
  my code :</p>
  
  <p>public void binddropdownlist()
          {</p>
  
  <pre><code>        DataTable dt = new DataTable();
  
           DbConnection b = new DbConnection();     
  
          try
          {
  
              b.OpenConnection();
  
  
              string SqlStatement = "Select Col1 + Col2  from tablename";
  
             SqlCommand SqlCmd = new SqlCommand(SqlStatement, b);
              SqlDataAdapter da = new SqlDataAdapter ();
              da.Fill(dt);
  
              if(dt.Rows.Count&gt;0)
              {
                  Locdrplist.DataSource = dt;
                  Locdrplist.DataTextField = "Col1";
                  Locdrplist.DataValueField = "Col2";
                  Locdrplist.DataBind();
              }
  
          }
  
          catch(System.Data.SqlClient.SqlException ex)
          {
              string msg = "FetchError";
  
              throw new Exception("error");
          }
  
          finally
          {
             b.CloseConnection();
          }    
        }
  </code></pre>
  
  <p>I am getting error to pass string value but don't know how to make class instance as string please help me</p>