DataObject.GetText Method

Definition

Returns a string that contains the text data in this data object.

Overloads

GetText(TextDataFormat)

Returns a string that contains text data of the specified format in this data object.

GetText()

Returns a string that contains the UnicodeText data in this data object.

GetText(TextDataFormat)

Returns a string that contains text data of the specified format in this data object.

C#
public string GetText(System.Windows.TextDataFormat format);

Parameters

format
TextDataFormat

A member of TextDataFormat that specifies the specific text data format to retrieve.

Returns

A string containing text data in the specified data format, or an empty string if no corresponding text data is available.

Exceptions

format does not specify a valid member of TextDataFormat.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

GetText()

Returns a string that contains the UnicodeText data in this data object.

C#
public string GetText();

Returns

A string that contains the UnicodeText data, or an empty string if no UnicodeText data is available.

Remarks

The UnicodeText data format denotes 16-bit character encoded Unicode, also referred to as UTF-16, and USC-2.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9