• <bdo id='NL6DB'></bdo><ul id='NL6DB'></ul>
    1. <legend id='NL6DB'><style id='NL6DB'><dir id='NL6DB'><q id='NL6DB'></q></dir></style></legend><tfoot id='NL6DB'></tfoot>
    2. <i id='NL6DB'><tr id='NL6DB'><dt id='NL6DB'><q id='NL6DB'><span id='NL6DB'><b id='NL6DB'><form id='NL6DB'><ins id='NL6DB'></ins><ul id='NL6DB'></ul><sub id='NL6DB'></sub></form><legend id='NL6DB'></legend><bdo id='NL6DB'><pre id='NL6DB'><center id='NL6DB'></center></pre></bdo></b><th id='NL6DB'></th></span></q></dt></tr></i><div id='NL6DB'><tfoot id='NL6DB'></tfoot><dl id='NL6DB'><fieldset id='NL6DB'></fieldset></dl></div>

      1. <small id='NL6DB'></small><noframes id='NL6DB'>

        C# MessageBox 对话框结果

        时间:2023-09-15
            <i id='OQmc9'><tr id='OQmc9'><dt id='OQmc9'><q id='OQmc9'><span id='OQmc9'><b id='OQmc9'><form id='OQmc9'><ins id='OQmc9'></ins><ul id='OQmc9'></ul><sub id='OQmc9'></sub></form><legend id='OQmc9'></legend><bdo id='OQmc9'><pre id='OQmc9'><center id='OQmc9'></center></pre></bdo></b><th id='OQmc9'></th></span></q></dt></tr></i><div id='OQmc9'><tfoot id='OQmc9'></tfoot><dl id='OQmc9'><fieldset id='OQmc9'></fieldset></dl></div>
            <legend id='OQmc9'><style id='OQmc9'><dir id='OQmc9'><q id='OQmc9'></q></dir></style></legend>
            • <bdo id='OQmc9'></bdo><ul id='OQmc9'></ul>
                <tbody id='OQmc9'></tbody>

              <tfoot id='OQmc9'></tfoot>

              <small id='OQmc9'></small><noframes id='OQmc9'>

                1. 本文介绍了C# MessageBox 对话框结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想进行 MessageBox 确认.这是消息框:

                  I want to make a MessageBox confirmation. Here is the message box:

                  MessageBox.Show("Do you want to save changes?", "Confirmation", messageBoxButtons.YesNoCancel);
                  

                  我想做这样的事情(用伪代码):

                  And I want to make something like this (in pseudocode):

                  if (MessageBox.Result == DialogResult.Yes)
                      ;
                  else if (MessageBox.Result == DialogResult.No)
                      ;
                  else
                      ;
                  

                  如何在 C# 中做到这一点?

                  How can I do that in C#?

                  推荐答案

                  DialogResult result = MessageBox.Show("Do you want to save changes?", "Confirmation", MessageBoxButtons.YesNoCancel);
                  if(result == DialogResult.Yes)
                  { 
                      //...
                  }
                  else if (result == DialogResult.No)
                  { 
                      //...
                  }
                  else
                  {
                      //...
                  } 
                  

                  这篇关于C# MessageBox 对话框结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Page.OnAppearing 中的 Xamarin.Forms Page.DisplayAlert 下一篇:如何使用 Windows 10 附带的 Microsoft Print To PDF 打印机以编程方式打印到 PDF 文

                  相关文章

                    <tfoot id='FrDHL'></tfoot>

                    • <bdo id='FrDHL'></bdo><ul id='FrDHL'></ul>
                      <legend id='FrDHL'><style id='FrDHL'><dir id='FrDHL'><q id='FrDHL'></q></dir></style></legend>
                    1. <i id='FrDHL'><tr id='FrDHL'><dt id='FrDHL'><q id='FrDHL'><span id='FrDHL'><b id='FrDHL'><form id='FrDHL'><ins id='FrDHL'></ins><ul id='FrDHL'></ul><sub id='FrDHL'></sub></form><legend id='FrDHL'></legend><bdo id='FrDHL'><pre id='FrDHL'><center id='FrDHL'></center></pre></bdo></b><th id='FrDHL'></th></span></q></dt></tr></i><div id='FrDHL'><tfoot id='FrDHL'></tfoot><dl id='FrDHL'><fieldset id='FrDHL'></fieldset></dl></div>

                      <small id='FrDHL'></small><noframes id='FrDHL'>