MimeContentType Class
The value of a Content-Type header ([RFC 2045] 5): a media type, a subtype and parameters.
public sealed class MimeContentTypeConstructors
| Name | Description |
|---|---|
| MimeContentType(string, string) | Initializes a new instance of the MimeContentType class. |
MimeContentType(string, string)
MimeContentType.csInitializes a new instance of the MimeContentType class.
Properties
| Name | Description |
|---|---|
| Boundary | Gets or sets the boundary parameter of a multipart type. |
| Charset | Gets or sets the charset parameter. |
| MediaSubtype | Gets or sets the media subtype, such as plain or mixed. |
| MediaType | Gets or sets the media type, such as text or multipart. |
| MimeType | Gets the type and the subtype, such as text/plain. |
| Name | Gets or sets the name parameter, the file name that old clients give to an attachment. |
| Parameters | Gets the parameters, with case-insensitive names. |
Boundary
MimeContentType.csCharset
MimeContentType.csMediaSubtype
MimeContentType.csMediaType
MimeContentType.csMimeType
MimeContentType.csParameters
MimeContentType.csGets the parameters, with case-insensitive names.
public IDictionary<string, string> Parameters { get; }Property value
Methods
| Name | Description |
|---|---|
| IsMimeType(string, string) | Returns whether the type is the given type and subtype, ignoring case. |
| Parse(string) | Parses the value of a Content-Type header. An invalid value gives text/plain ([RFC 2045] 5.2). |
| ToString() | Returns the value of the header: the type, the subtype and the parameters. |
IsMimeType(string, string)
MimeContentType.csParse(string)
MimeContentType.csParses the value of a Content-Type header. An invalid value gives text/plain ([RFC 2045] 5.2).
public static MimeContentType Parse(string value)Parameters
valuestring- The value of the header, with its encoded words.
Returns
MimeContentType The content type.