Читати англійською Редагувати

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


MediaTypeHeaderValue Class

Definition

Represents a media type used in a Content-Type header as defined in the RFC 2616.

C#
public class MediaTypeHeaderValue
C#
public class MediaTypeHeaderValue : ICloneable
Inheritance
MediaTypeHeaderValue
Derived
Implements

Remarks

The MediaTypeHeaderValue class provides support for the media type used in a Content-Type header as defined in RFC 2616 by the IETF.

An example of a media-type would be "text/plain; charset=iso-8859-5".

Constructors

MediaTypeHeaderValue(MediaTypeHeaderValue)

Initializes a new instance of the MediaTypeHeaderValue class.

MediaTypeHeaderValue(String, String)

Initializes a new instance of the MediaTypeHeaderValue class.

MediaTypeHeaderValue(String)

Initializes a new instance of the MediaTypeHeaderValue class.

Properties

CharSet

Gets or sets the character set.

MediaType

Gets or sets the media-type header value.

Parameters

Gets or sets the media-type header value parameters.

Methods

Equals(Object)

Determines whether the specified Object is equal to the current MediaTypeHeaderValue object.

GetHashCode()

Serves as a hash function for an MediaTypeHeaderValue object.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Parse(String)

Converts a string to an MediaTypeHeaderValue instance.

ToString()

Returns a string that represents the current MediaTypeHeaderValue object.

TryParse(String, MediaTypeHeaderValue)

Determines whether a string is valid MediaTypeHeaderValue information.

Explicit Interface Implementations

ICloneable.Clone()

Creates a new object that is a copy of the current MediaTypeHeaderValue instance.

Applies to

Продукт Версії
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 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
.NET Standard 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0