コード例 #1
0
    static void Main(String[] args)
    {
        UserControlOne uc  = new UserControlOne();
        UserControlTwo uc2 = new UserControlTwo();

        uc.Update(uc2.Update);
    }
コード例 #2
0
    static void Main(String[] args)
    {
        // calling exmaple 1
        UserControlOne uc  = new UserControlOne();
        UserControlTwo uc2 = new UserControlTwo();

        uc.Update(uc2.Update);
        // calling example 2
        UserControlOne anotherUserControl = new UserControlOne();

        anotherUserControl.Update();
    }