IWMSOutgoingDistributionConnections.length (C#)

The length property retrieves the number of IWMSOutgoingDistributionConnection objects contained in the IWMSOutgoingDistributionConnections collection.

int = IWMSOutgoingDistributionsConnections.length;

Property Value

int containing the number of IWMSOutgoingDistributionConnection objects in the collection.

Remarks

This is the JScript version of IWMSOutgoingDistributionConnections.Count. It is included for developers more comfortable with JScript syntax.

This property is read-only.

Example

using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;

// Declare variables.
WMSServer                              Server;
IWMSOutgoingDistributionConnections    Connections;
IWMSOutgoingDistributionConnection     Connection;

try {
    // Create a new WMSServer object.
    Server = new WMSServerClass();

    // Retrieve the IWMSOutgoingDistributionConnections object.
    Connections = Server.OutgoingDistributionConnections;

    // Use the length property as an iteration boundary
    // when accessing individual objects in the collection.
    for (int i = 0; i < Connections.length; i++)
    {
        // Retrieve an IWMSOutgoingDistributionConnection object 
        // from the collection.
        Connection = Connections[i];
    }
}
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
}
catch (Exception e) {
    // TODO: Handle exceptions.
}

Requirements

Reference: Add a reference to Microsoft.WindowsMediaServices.

Namespace: Microsoft.WindowsMediaServices.Interop.

Assembly: Microsoft.WindowsMediaServices.dll.

Library: WMSServerTypeLib.dll.

Platform: Windows Server 2003 family, Windows Server 2008 family.

See Also

Reference

IWMSOutgoingDistributionConnection Object (C#)

IWMSOutgoingDistributionConnections Object (C#)

IWMSOutgoingDistributionConnections.Count (C#)