ContentType Property

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

Gets the content type of the response.

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

Syntax

'Declaration
Public Overrides ReadOnly Property ContentType As String
public override string ContentType { get; }
public:
virtual property String^ ContentType {
    String^ get () override;
}
abstract ContentType : string with get
override ContentType : string with get
override function get ContentType () : String

Property Value

Type: System. . :: . .String
A string that contains the content type of the response.

Exceptions

Exception Condition
ObjectDisposedException

The current instance has been disposed.

Remarks

The ContentType property contains the value of the Content-Type header returned with the response.

.NET Framework Security

See Also

Reference

HttpWebResponse Class

System.Net Namespace