OPC Studio User's Guide and Reference
Port Property (ResourceDescriptor)



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib Namespace > ResourceDescriptor Class : Port Property
The port number of the URI.
Syntax
'Declaration
 
<DefaultValueAttribute(-1)>
<IgnoreDataMemberAttribute()>
<XmlIgnoreAttribute()>
Public Property Port As Integer
'Usage
 
Dim instance As ResourceDescriptor
Dim value As Integer
 
instance.Port = value
 
value = instance.Port
[DefaultValue(-1)]
[IgnoreDataMember()]
[XmlIgnore()]
public int Port {get; set;}
[DefaultValue(-1)]
[IgnoreDataMember()]
[XmlIgnore()]
public:
property int Port {
   int get();
   void set (    int value);
}
Remarks
The port number defines the protocol port for contacting the server referenced in the URI. If a port is not specified as part of the URI, the Port property returns the value -1 to indicate that the server uses the default value for the protocol.
Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also