我正在尝试学习委托的用法,我见过的所有代码示例都使用参数传递给内部方法,
该示例的目标是在不传递参数的情况下在表单启动时打开 2 个消息框这是我尝试过的代码,但我不知道如何调用内部函数
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
namespace Messageboxes2
{
public partial class MainForm : Form
{
    public MainForm()
    {
        InitializeComponent();
        Delegation delegated = new Delegation();
        delegated.
    }
}
class Delegation
{    
    public delegate string mbox ();
    static void msgboz1(mbox d)
    {
        MessageBox.Show("1rstBox");
    }
    static void msbox2(mbox d)
    { 
        MessageBox.Show("2ndbox");
    }
}
}
谢谢您的帮助