title: How to display sql query results into textbox on c#?
body: <p>I'm currently making a voting app on C# Windows Form. </p>
  
  <p>So I made a SQL query to count how many people voted for a specific candidate that will be displayed on textBox4</p>
  
  <pre><code> private void button1_Click(object sender, EventArgs e)
   {
       string idcan = textBox3.Text;
       string score = textBox4.Text;
       Connection con = new Connection();
       SqlConnection sqlcon = con.Sambung();
  
       sqlcon.Open();
       string cek = "select count (ID_Candidate) as Score from DataVote where ID_Candidate = @idcan";
  
       using (sqlcon)
       {
           SqlCommand com = new SqlCommand(cek, sqlcon);
           com.Parameters.Add("idcan", SqlDbType.VarChar, 5).Value = score;
       }
       try
       {
           sqlcon.Open();
       }
       catch (Exception ex)
       {
           MessageBox.Show(ex.Message);
       }
  
   }
  </code></pre>
  
  <p>How to display the results of the above SQL query to textBox4?</p>