IWMSOutgoingDistributionConnections.Count (C#)
.gif)
| Previous | Next |
IWMSOutgoingDistributionConnections.Count (C#)
The Count property retrieves the number of IWMSOutgoingDistributionConnection objects contained in the IWMSOutgoingDistributionConnections collection.
Syntax
int = IWMSOutgoingDistributionConnections.Count;
Property Value
int containing the number of IWMSOutgoingDistributionConnection objects.
Remarks
This property is read-only.
Example Code
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 Count property as an iteration boundary
// when accessing individual objects in the collection.
for (int i = 0; i < Connections.Count; i++)
{
// IWMSOutgoingDistributionConnection
.
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
- IWMSOutgoingDistributionConnection Object (C#)
- IWMSOutgoingDistributionConnections Object (C#)
- IWMSOutgoingDistributionConnections.length (C#)
| Previous | Next |