Show a message box from a class in c#?

后端 未结 4 1439
栀梦
栀梦 2021-01-07 16:55

How do you get a class to interact with the form to show a message box?

4条回答
  •  清歌不尽
    2021-01-07 17:41

    System.Windows.MessageBox.Show("Hello world"); //WPF
    System.Windows.Forms.MessageBox.Show("Hello world"); //WinForms
    

提交回复
热议问题