TryParse Method (String)

Parses the supplied string.

Namespace:  Microsoft.Rtc.Signaling
Assembly:  Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)

Syntax

'Declaration
Public Function TryParse ( _
    sdpText As String _
) As Boolean
'Usage
Dim instance As Sdp
Dim sdpText As String
Dim returnValue As Boolean

returnValue = instance.TryParse(sdpText)
public bool TryParse(
    string sdpText
)

Parameters

Return Value

Type: System..::..Boolean
Returns true if the string contained a valid SDP. If false is returned, [LastParseErrorMessage] and [LastParseErrorLineNumber] provide information about why the SDP cannot be parsed.

Exceptions

Exception Condition
ArgumentNullException

Thrown when sdpstr is nullNothingnullptrunita null reference (Nothing in Visual Basic). sdpstr cannot be nullNothingnullptrunita null reference (Nothing in Visual Basic).

InvalidOperationException

Thrown when an attempt to parse more than one text was made.

Remarks

[TryParse] converts the string to an array of UTF8 encoded bytes and calls the [TryParse]() function with an array of bytes.

See Also

Reference

Sdp<(Of <(<'TGlobalDescription, TMediaDescription>)>)> Class

Sdp<(Of <(<'TGlobalDescription, TMediaDescription>)>)> Members

TryParse Overload

Microsoft.Rtc.Signaling Namespace