Gets or sets the command to send to the FTP server.
A String value that contains the FTP command to send to the server.
The default value is DownloadFile.
The Method property determines which command is sent to the server.
You set the Method by using the strings defined in the public field members of the WebRequestMethods..::.Ftp class.
Note that the strings defined in the WebRequestMethods.Ftp class are the only supported options for the Method property.
Setting the Method property to any other value will result in an ArgumentException exception.
| Exception | Condition |
|---|---|
| InvalidOperationException | A new value was specified for this property for a request that is already in progress. |
| ArgumentException | The method is invalid.
- or - The method is not supported. - or - Multiple methods were specified. |