你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ThreadMessageOptions.GetTextContent Method

Definition

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().

Applies to