MediaTypeHeaderValue.TryParse Method

Definition

Overloads

TryParse(StringSegment, MediaTypeHeaderValue)

Takes a media type, which can include parameters, and parses it into the MediaTypeHeaderValue and its associated parameters.

TryParse(String, MediaTypeHeaderValue)

TryParse(StringSegment, MediaTypeHeaderValue)

Takes a media type, which can include parameters, and parses it into the MediaTypeHeaderValue and its associated parameters.

public:
 static bool TryParse(Microsoft::Extensions::Primitives::StringSegment input, [Runtime::InteropServices::Out] Microsoft::Net::Http::Headers::MediaTypeHeaderValue ^ % parsedValue);
public static bool TryParse (Microsoft.Extensions.Primitives.StringSegment input, out Microsoft.Net.Http.Headers.MediaTypeHeaderValue parsedValue);
public static bool TryParse (Microsoft.Extensions.Primitives.StringSegment input, out Microsoft.Net.Http.Headers.MediaTypeHeaderValue? parsedValue);
static member TryParse : Microsoft.Extensions.Primitives.StringSegment * MediaTypeHeaderValue -> bool
Public Shared Function TryParse (input As StringSegment, ByRef parsedValue As MediaTypeHeaderValue) As Boolean

Parameters

input
StringSegment

The StringSegment with the media type. The media type constructed here must not have an y

Returns

Boolean

True if the value was successfully parsed.

Applies to

TryParse(String, MediaTypeHeaderValue)

public:
 static bool TryParse(System::String ^ input, [Runtime::InteropServices::Out] Microsoft::Net::Http::Headers::MediaTypeHeaderValue ^ % parsedValue);
public static bool TryParse (string input, out Microsoft.Net.Http.Headers.MediaTypeHeaderValue parsedValue);
static member TryParse : string * MediaTypeHeaderValue -> bool
Public Shared Function TryParse (input As String, ByRef parsedValue As MediaTypeHeaderValue) As Boolean

Parameters

input
String
parsedValue
MediaTypeHeaderValue

Returns

Boolean

Applies to