New to Telerik ReportingStart a free 30-day trial

Represents text-based content with a specified MIME type.

Definition

Namespace:Telerik.Reporting.AI

Assembly:Telerik.Reporting.dll

Syntax:

C#
public sealed class TextContent : IContent

Inheritance: objectTextContent

Implements: IContent

Constructors

Initializes a new instance with the specified text and MIME type.

C#
public TextContent(string text, string mimeType)
Parameters:textstring

The text content.

mimeTypestring

The MIME type of the text content.

Initializes a new instance with the specified text using "text/plain" as the default MIME type.

C#
public TextContent(string text)
Parameters:textstring

The text content.

Fields

Defines the type identifier for TextContent.

C#
public const string ContentType = "TextContent"

Defines the default MIME type for TextContent.

C#
public const string DefaultMimeType = "text/plain"

Properties

Text

string

Gets the text content.

C#
public string Text { get; }

Methods

Returns the text content as a string.

C#
public string AsString()
Returns:

string

The text content.

Implements: IContent.AsString()