DataContent.HasTopLevelMediaType(String) Method
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.
Determines whether the MediaType's top-level type matches the specified topLevelType
.
public:
bool HasTopLevelMediaType(System::String ^ topLevelType);
public bool HasTopLevelMediaType(string topLevelType);
member this.HasTopLevelMediaType : string -> bool
Public Function HasTopLevelMediaType (topLevelType As String) As Boolean
Parameters
Returns
true
if the type portion of MediaType matches the specified value; otherwise, false.
Remarks
A media type is primarily composed of two parts, a "type" and a "subtype", separated by a slash ("/"). The type portion is also referred to as the "top-level type"; for example, "image/png" has a top-level type of "image". HasTopLevelMediaType(String) compares the specified topLevelType
against the type portion of MediaType.