System::Net::Http::Headers::MediaTypeHeaderValue class

MediaTypeHeaderValue class

Represents a MIME type in a value of the ‘Content-Type’ header. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

class MediaTypeHeaderValue : public virtual System::ICloneable

Methods

MethodDescription
Equals(System::SharedPtr<Object>) overrideCompares objects using C# Object.Equals semantics.
get_CharSet()RTTI information.
get_MediaType()Gets a value of the media-type header.
get_Parameters()Returns the value parameters of the media-type header.
GetHashCode() const overrideAnalog of C# Object.GetHashCode() method. Enables hashing of custom objects.
static GetMediaTypeLength(String, int32_t, HeaderFunc<System::SharedPtr<MediaTypeHeaderValue>>, System::SharedPtr<MediaTypeHeaderValue>&)Converts a passed string from the specified index to an instance of the MediaTypeHeaderValue class.
MediaTypeHeaderValue()Constructs a new instance.
MediaTypeHeaderValue(String)Constructs a new instance.
static Parse(String)Converts a passed string to an instance of the MediaTypeHeaderValue class.
set_CharSet(String)Sets a character set.
set_MediaType(String)Sets a value of the media-type header.
ToString() const overrideAnalog of C# Object.ToString() method. Enables converting custom objects to string.
static TryParse(String, System::SharedPtr<MediaTypeHeaderValue>&)Tries to convert a passed string to an instance of the MediaTypeHeaderValue class.

See Also