Поделиться через


HttpContent.TryComputeLength Method

Determines whether the HTTP content has a valid length in bytes.

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

Syntax

'Declaration
Protected Friend MustOverride Function TryComputeLength ( _
    <OutAttribute> ByRef length As Long _
) As Boolean
'Usage
Dim length As Long 
Dim returnValue As Boolean 

returnValue = Me.TryComputeLength(length)
protected internal abstract bool TryComputeLength(
    out long length
)
protected public:
virtual bool TryComputeLength(
    [OutAttribute] long long% length
) abstract
abstract TryComputeLength : 
        length:int64 byref -> bool
abstract function TryComputeLength(
    length : long
) : boolean

Parameters

  • length
    Type: System.Int64
    The length in bytes of the HHTP content.

Return Value

Type: System.Boolean
Returns Boolean.true if length is a valid length; otherwise, false.

See Also

Reference

HttpContent Class

System.Net.Http Namespace