System.Net.FtpWebRequest.UseBinary Property

Gets or sets a bool value that specifies the data type for file transfers.

Syntax

public bool UseBinary { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

If you are sending binary data, such as an image, set this property to true. If you are sending text, set the property to false. Specifying true causes the System.Net.FtpWebRequest to send a "TYPE I" command to the server. Specifying false causes the System.Net.FtpWebRequest to send a "Type A" command to the server. FTP servers can ignore these commands.

Changing FtpWebRequest.UseBinary after calling the FtpWebRequest.GetRequestStream, FtpWebRequest.BeginGetRequestStream(AsyncCallback, object), FtpWebRequest.GetResponse, or FtpWebRequest.BeginGetResponse(AsyncCallback, object) method causes an InvalidOperationException exception.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0