System.Windows.Forms.DataObject.GetText Method

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

Syntax

public virtual string GetText (TextDataFormat format)

Parameters

format
One of the System.Windows.Forms.TextDataFormat values.

Returns

The text data in the data object or string.Empty if the data object does not contain data in the specified 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