Listing 7

using namespace System;

public ref struct Server
{
/*1*/   delegate void NewMsgEventHandler(String^ msg);
/*2*/   static event NewMsgEventHandler^ ProcessNewMsg;
/*3*/   static void Broadcast(String^ msg)
    {
        if (ProcessNewMsg != nullptr)
        {
            ProcessNewMsg(msg);
        }
    }   
};