Share via


ManagementScopePath.Port Property

Definition

Gets the port number.

public:
 property int Port { int get(); };
public int Port { get; }
member this.Port : int
Public ReadOnly Property Port As Integer

Property Value

The port number.

Examples

The following example sends ManagementScopePath details to the trace listener.

void TrcMSP(ManagementScopePath msp) {

    Trace.WriteLine("ApplicationPath = " + msp.ApplicationPath);
    Trace.WriteLine("Port = " + msp.Port.ToString());
    if (msp.FrameworkVersion != null &&
        !string.IsNullOrEmpty(msp.FrameworkVersion.Version.ToString()))
        Trace.WriteLine("FrameworkVersion = " + msp.FrameworkVersion.Version);
    Trace.WriteLine("ServerName = " + msp.ServerName);
    Trace.WriteLine("ServerReference = " + msp.ServerReference);
    Trace.WriteLine("SiteName = " + msp.SiteName);
} 

Applies to