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 ReadOnly Property ContentLength As Long
'Usage
Dim instance As WebTestResponse
Dim value As Long
value = instance.ContentLength
public long ContentLength { get; }
public:
property long long ContentLength {
long long get ();
}
public function get ContentLength () : long
Property Value
Type: System.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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.VisualStudio.TestTools.WebTesting Namespace