回答編集履歴
1
サンプルコードのインデント
test
CHANGED
@@ -16,29 +16,27 @@
|
|
16
16
|
|
17
17
|
```C#
|
18
18
|
|
19
|
-
|
19
|
+
foreach (var process in Process.GetProcesses().Where(p => p.ProcessName == "MicrosoftEdgeCP"))
|
20
20
|
|
21
|
-
|
21
|
+
{
|
22
22
|
|
23
|
-
|
23
|
+
Console.WriteLine(process.HasExited);
|
24
24
|
|
25
|
-
|
25
|
+
if (!process.CloseMainWindow())
|
26
26
|
|
27
|
-
|
27
|
+
{
|
28
28
|
|
29
|
-
|
29
|
+
process.Kill();
|
30
30
|
|
31
|
-
|
31
|
+
}
|
32
32
|
|
33
|
-
|
33
|
+
Console.WriteLine(process.HasExited);
|
34
34
|
|
35
|
-
|
35
|
+
Console.WriteLine(process.CloseMainWindow());
|
36
36
|
|
37
|
-
|
37
|
+
process.Dispose();
|
38
38
|
|
39
|
-
|
39
|
+
}
|
40
|
-
|
41
|
-
|
42
40
|
|
43
41
|
```
|
44
42
|
|