System.Windows.Forms.DataObject.SetText Method

Adds text data to the data object in the format indicated by the specified System.Windows.Forms.TextDataFormat value.

Syntax

public virtual void SetText (string textData, TextDataFormat format)

Parameters

textData
The text to add to the data object.
format
One of the System.Windows.Forms.TextDataFormat values.

Remarks

To retrieve text data from the data object, first use the erload:System.Windows.Forms.DataObject.ContainsText method to determine whether the data object contains image data before retrieving it with the erload:System.Windows.Forms.DataObject.GetText method.

Requirements

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