private void SomeMethod(object sender, EventArgs e)
 {
    ConnectToSql connToSql = new ConnectToSql(); // Instantiate the new class here.
    connToSql.SqlConnection();  // Use the new class
 }
 private void button1_Click(object sender, EventArgs e)
 {
     ConnectToSql connToSql = new ConnectToSql();
     connToSql.SqlConnection();
 }