DataObject.GetText Method

Definition

Retrieves text data from the data object.

Overloads

GetText(TextDataFormat)

Retrieves text data from the data object in the format indicated by the specified TextDataFormat value.

GetText()

Retrieves text data from the data object in the UnicodeText format.

GetText(TextDataFormat)

Source:
DataObject.cs
Source:
DataObject.cs
Source:
DataObject.cs

Retrieves text data from the data object in the format indicated by the specified TextDataFormat value.

public virtual string GetText (System.Windows.Forms.TextDataFormat format);

Parameters

format
TextDataFormat

One of the TextDataFormat values.

Returns

The text data in the data object or Empty if the data object does not contain data in the specified format.

Exceptions

format is not a valid TextDataFormat value.

Remarks

Use the ContainsText method to determine whether the data object contains text data before retrieving it with this method.

Use the SetText method to add text data to the data object.

See also

Applies to

.NET Framework 4.8.1 og andre versioner
Produkt Versions
.NET Framework 2.0, 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()

Source:
DataObject.cs
Source:
DataObject.cs
Source:
DataObject.cs

Retrieves text data from the data object in the UnicodeText format.

public virtual string GetText ();

Returns

The text data in the data object or Empty if the data object does not contain data in the UnicodeText format.

Remarks

Use the ContainsText method to determine whether the data object contains text data before retrieving it with this method.

Use the SetText method to add text data to the data object.

See also

Applies to

.NET Framework 4.8.1 og andre versioner
Produkt Versions
.NET Framework 2.0, 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