سؤال

كيف تحصل على فئة للتفاعل مع النموذج لإظهار مربع رسالة؟

هل كانت مفيدة؟

المحلول

using System.Windows.Forms;
...
MessageBox.Show("Hello World!");

نصائح أخرى

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

جرب هذا:

System.Windows.Forms.MessageBox.Show("Here's a message!");
using System.Windows.Forms;

public class message
{
    static void Main()
    {  
        MessageBox.Show("Hello World!"); 
    }
}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top