ภาษา

HttpContentHeaders.ContentLength Property

Definition

Gets or sets the value of the Content-Length content header on an HTTP response.

public:
 property Nullable<long> ContentLength { Nullable<long> get(); void set(Nullable<long> value); };
public long? ContentLength { get; set; }
member this.ContentLength : Nullable<int64> with get, set
Public Property ContentLength As Nullable(Of Long)

Property Value

The value of the Content-Length content header on an HTTP response.

Exceptions

The value was never set and underlying HttpContent was disposed when trying to calculate it.

Remarks

If the header has not been set, its value may be computed on demand from buffered content or by using TryComputeLength.

Applies to