Прочетете на английски Редактиране

Споделяне чрез


PackWebResponse.ContentType Property

Definition

Gets the Multipurpose Internet Mail Extensions (MIME) content type of the response stream's content.

C#
public override string ContentType { get; }

Property Value

The MIME type of the stream's content.

Remarks

If a request does not specify a part in the package, it returns the MIME type of the package.

Requests that specify a part in the package return one of the following:

  1. If the requested part contains a ContentType value, the ContentType value is returned.

  2. If the requested part contains no ContentType value but the stream name contains a recognized MIME extension type, the MIME type corresponding to the extension is returned.

  3. If the requested part does not contain a ContentType value nor a recognized MIME extension type, ContentType returns an empty string.

Applies to

Продукт Версии
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10