MediaTypeHeaderValue.MediaType Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the value of the media type. Returns Empty if there is no media type.
public:
property System::String ^ MediaType { System::String ^ get(); void set(System::String ^ value); };
public:
property Microsoft::Extensions::Primitives::StringSegment MediaType { Microsoft::Extensions::Primitives::StringSegment get(); void set(Microsoft::Extensions::Primitives::StringSegment value); };
public string MediaType { get; set; }
public Microsoft.Extensions.Primitives.StringSegment MediaType { get; set; }
member this.MediaType : string with get, set
member this.MediaType : Microsoft.Extensions.Primitives.StringSegment with get, set
Public Property MediaType As String
Public Property MediaType As StringSegment
Property Value
Examples
For the media type "application/json"
, the property gives the value
"application/json"
.