Try this:
using (SqlConnection connection = new SqlConnection("YOUR CONNECTION STRING HERE"))
using (SqlCommand command = new SqlCommand("dbs_sp_applyrule2_helo", connection))
{
command.CommandType = CommandType.StoredProcedure;
SqlParameter idParameter = command.Parameters.Add("@ID", SqlDbType.Int);
connection.Open();
foreach (int id in listOfIdsToUse)
{
idParameter.Value = id;
command.ExecuteNonQuery();
}
}