TryParse Method (Byte[], Int32, Int32, Boolean)

Parses the supplied array of bytes as an SDP.

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


Public Function TryParse ( _
    rawSdp As Byte(), _
    offset As Integer, _
    count As Integer, _
    strict As Boolean _
) As Boolean
Dim instance As Sdp
Dim rawSdp As Byte()
Dim offset As Integer
Dim count As Integer
Dim strict As Boolean
Dim returnValue As Boolean

returnValue = instance.TryParse(rawSdp, _
    offset, count, strict)
public bool TryParse(
    byte[] rawSdp,
    int offset,
    int count,
    bool strict


  • rawSdp
    Type: array<System..::..Byte>[]()[][]
    The array of bytes containing the SDP to parse.
  • offset
    Type: System..::..Int32
    The offset into the byte array where parsing should begin.
  • strict
    Type: System..::..Boolean
    A value of true indicates the SDP parser should strictly enforce the SDP encoding rules. It is recommended that strict parsing is always used; however, being more lenient can be useful if there is a need to communicate with a noncompliant device.

Return Value

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


Exception Condition

Thrown when rawSdp is nullNothingnullptrunita null reference (Nothing in Visual Basic).


Thrown when start and length are not within range of the supplied array.


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


Returns true if the SDP is valid.

See Also


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

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

TryParse Overload

Microsoft.Rtc.Signaling Namespace