回答編集履歴

1

最初に例示したサンプルに加筆した感じのソースコードに修正

2024/04/11 02:05

投稿

juner
juner

スコア754

test CHANGED
@@ -10,7 +10,9 @@
10
10
  例えば先述の OKCancel にした場合は 次の様になります。
11
11
 
12
12
  ```
13
+
13
- if (MessageBox.Show(xxx,"xxx",MessageBoxButtons.OKCancel,MessageBoxIcon.Information) is DialogResult.OK)
14
+ var result = MessageBox.Show(xxx,"xxx",MessageBoxButtons.OKCancel,MessageBoxIcon.Information);
15
+ if (result is DialogResult.OK)
14
16
  {
15
17
  // OK のときの処理
16
18
  } else {