FtpClientConnection.Close 方法

定义

关闭 FTP 连接。

public:
 void Close();
public void Close ();
member this.Close : unit -> unit
Public Sub Close ()

示例

下面的代码示例检查是否已 FtpClientConnection 连接。 如果是这样,则使用 Close.

// Close the connection to the FTP Server, if it is connected.  
if (ftpClientConnection != null)  
    ftpClientConnection.Close();  
' Close the connection to the FTP Server, if it is connected.  
If Not ftpClientConnection Is Nothing Then  
    ftpClientConnection.Close()  
End If  

适用于