NET FTP Library
UserName Property (FTP)
Example 






KellermanSoftware.NetFtpLibrary Namespace > FTP Class : UserName Property
Specifies the user name to use while communicating with the FTP Server.
Syntax
'Declaration
 
Public Overridable Property UserName As System.String
'Usage
 
Dim instance As FTP
Dim value As System.String
 
instance.UserName = value
 
value = instance.UserName
public virtual System.string UserName {get; set;}
public read-write property UserName: System.String; virtual; 
public function get,set UserName : System.String
public: __property virtual System.string* get_UserName();
public: __property virtual void set_UserName( 
   System.string* value
);
public:
virtual property System.String^ UserName {
   System.String^ get();
   void set (    System.String^ value);
}
Example
FTP ftp = new FTP(); //Trial Mode            
//FTP ftp = new FTP("place user name here", "place license key here");
 
// set the user name to use against the ftp server
ftp.UserName = "anonymous"; // anonymous user
 
System.Console.WriteLine("The login user  is {0}", ftp.UserName);
Dim ftp As FTP = New FTP() 'Trial Mode
'FTP ftp = new FTP("place user name here", "place license key here");
 
' set the user name to use against the ftp server
ftp.UserName = "anonymous" ' anonymous user
 
System.Console.WriteLine("The login user  is {0}", ftp.UserName)
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

FTP Class
FTP Members