Created
October 1, 2014 12:49
-
-
Save Fhernd/6f709ff5ffc4005b2221 to your computer and use it in GitHub Desktop.
Demostración del uso del método `Kill` de `Process`.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using System.Threading; | |
namespace Receta.CSharp.R0416 | |
{ | |
public sealed class UsoKill | |
{ | |
public static void Main() | |
{ | |
// Creación de proceso de Bloc de notas: | |
Process procesoBlocNotas = Process.Start ("notepad.exe"); | |
// Espera de 3 segundos: | |
Thread.Sleep (3000); | |
// Terminación abrupta del Bloc de notas: | |
procesoBlocNotas.Kill (); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment