แก้ไข

แชร์ผ่าน


CodeConnectAccess.DefaultPort Field

Definition

Contains the value used to represent the default port.

public: static initonly int DefaultPort;
public static readonly int DefaultPort;
 staticval mutable DefaultPort : int
Public Shared ReadOnly DefaultPort As Integer 

Field Value

Examples

The following code example demonstrates creating a CodeConnectAccess object that specifies FTP for the scheme and the default port for FTP.



static CodeConnectAccess^ CreateFtpAndDefaultPortAccess()
{
    return gcnew CodeConnectAccess(Uri::UriSchemeFtp, 
        CodeConnectAccess::DefaultPort);
}
public static CodeConnectAccess CreateFtpAndDefaultPortAccess()
{
    return new CodeConnectAccess(Uri.UriSchemeFtp, CodeConnectAccess.DefaultPort);
}

Remarks

To create a CodeConnectAccess object that has the default port for a specified scheme, use this field as the allowPort parameter of the CodeConnectAccess constructor.

The value of this field is -3.

Applies to