ContentLength Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets the length of the content returned by the request.

Namespace:  System.Net
Assembly:  System.Http (in System.Http.dll)

public override long ContentLength { get; }

Property Value

Type: System..::..Int64
The number of bytes returned by the request. Content length does not include header information.

The ContentLength property contains the value of the Content-Length header returned with the response. If the Content-Length header is not set in the response, ContentLength is set to the value -1.

Show: