System.Windows.Forms.DataObject.GetText Method

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

Syntax

public virtual string GetText ()

Returns

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

Remarks

Use the erload:System.Windows.Forms.DataObject.ContainsText method to determine whether the data object contains text data before retrieving it with this method.

Use the erload:System.Windows.Forms.DataObject.SetText method to add text data to the data object.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0