NET SFTP Library
Dispose() Method
Example 






KellermanSoftware.NetSFtpLibrary Namespace > SFTP Class : Dispose() Method
Disposes the object by canceling any async transfer and destroying the FTPRequest object
Syntax
'Declaration
 
Public Sub Dispose() 
'Usage
 
Dim instance As SFTP
 
instance.Dispose()
public void Dispose()
public procedure Dispose(); 
public function Dispose();
public: void Dispose(); 
public:
void Dispose(); 
Example
//Disposes the object by canceling any async transfer 
//and destroying the FTPRequest object 
 
// Dispose is called by .net when writing something like
using (SFTP sftp = new SFTP())
{
 
}
// dispose is called here for the ftp object
 
//Alternate way
SFTP sftp = new SFTP();
sftp.Dispose();
'Disposes the object by canceling any async transfer
'and destroying the FTPRequest object
 
' Dispose is called by .net when writing something like
Using ftp As FTP = New FTP()
 
End Using
' dispose is called here for the ftp object
 
'Alternate way
Dim sftp As SFTP = New SFTP()
sftp.Dispose()
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

SFTP Class
SFTP Members