ThreadMessageOptions.GetTextContent 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.
Deserializes the underlying message content (stored as BinaryData) into a plain string.
public string GetTextContent();
member this.GetTextContent : unit -> string
Public Function GetTextContent () As String
Returns
The original text string if the content was provided in that format; otherwise, a JSON parsing error may occur.
Exceptions
Thrown if the binary content cannot be deserialized as a string (e.g., it was originally a collection of blocks).
Remarks
Use this method when you know or expect that Content was originally provided as a single plain-text string. For richer content, see GetContentBlocks().