how can i repeat my foreach in this code

  • Thread starter Thread starter Leo Learning
  • Start date Start date
L

Leo Learning

Guest
private void label1_Click(object sender, EventArgs e)
{
this.Hide();
Form3 form3 = new Form3();
form3.Show();
foreach (var process in Process.GetProcessesByName("notepad"))
{
process.Kill();
}
}
How Can I Repeat this forreach i try use while but i cant do

foreach (var process in Process.GetProcessesByName("notepad"))
{
process.Kill();
}
can someone help

Continue reading...
 
Back
Top