WebTestResponse.ContentLength Property

Gets the length of the content that is returned by the request.

Namespace:  Microsoft.VisualStudio.TestTools.WebTesting
Assembly:  Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)

Syntax

'Declaration
Public Property ContentLength As Long
public long ContentLength { get; internal set; }
public:
property long long ContentLength {
    long long get ();
    internal: void set (long long value);
}
member ContentLength : int64 with get, internal set
function get ContentLength () : long 
internal function set ContentLength (value : long)

Property Value

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

Exceptions

Exception Condition
ObjectDisposedException

The current instance has been disposed.

Remarks

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.

.NET Framework Security

See Also

Reference

WebTestResponse Class

Microsoft.VisualStudio.TestTools.WebTesting Namespace

Other Resources

HTTP