static bool checkParticipant(DDS.DomainParticipant participant)
    {
        DDS.DomainParticipantQos participantQos = new DDS.DomainParticipantQos();
        participant.get_qos(participantQos);

        DDS.PropertySeq properties = participantQos.property_qos.value;

        for (int i = 0; i < properties.length; i++)
        {
            if (String.Compare(properties.get_at(i).name,
                               "dds.transport.UDPv4.builtin.send_socket_buffer_size") == 0)
            {
                if (String.Compare(properties.get_at(i).value, NEW_SOCKET_BUFFER_SIZE_STRING)
                    != 0)
                {
                    Console.WriteLine("Error, send_socket_buffer_size...not modified");
                    return(false);
                }
            }
            if (String.Compare(properties.get_at(i).name,
                               "dds.transport.UDPv4.builtin.recv_socket_buffer_size") == 0)
            {
                string value = properties.get_at(i).value;
                if (String.Compare(properties.get_at(i).value, NEW_SOCKET_BUFFER_SIZE_STRING)
                    != 0)
                {
                    Console.WriteLine("Error, recv_socket_buffer_size...not modified");
                    return(false);
                }
            }
        }

        return(false);
    }
    static DDS.DomainParticipant createParticipant(int domainId)
    {
        DDS.DomainParticipant participant = null;

        DDS.DomainParticipantQos participantQos =
            new DDS.DomainParticipantQos();

        DDS.DomainParticipantFactory.get_instance()
        .get_default_participant_qos(participantQos);

        DDS.PropertySeq propertySeq =
            participantQos.property_qos.value;
        propertySeq.ensure_length(2, 2);

        /* Set the send socket buffer size */
        DDS.Property_t propertyElement = propertySeq.get_at(0);
        propertyElement.name =
            "dds.transport.UDPv4.builtin.send_socket_buffer_size";
        propertyElement.value     = NEW_SOCKET_BUFFER_SIZE_STRING;
        propertyElement.propagate = false;

        /* Set the send socket buffer size */
        propertyElement      = propertySeq.get_at(1);
        propertyElement.name =
            "dds.transport.UDPv4.builtin.recv_socket_buffer_size";
        propertyElement.value     = NEW_SOCKET_BUFFER_SIZE_STRING;
        propertyElement.propagate = false;

        /* Create the participant */
        participant =
            DDS.DomainParticipantFactory.get_instance().create_participant(
                domainId, participantQos,
                null /* listener */, DDS.StatusMask.STATUS_MASK_NONE);
        if (participant == null)
        {
            return(null);
        }
        return(participant);
    }