System.Windows.Forms.DataObject.SetData Method

Adds the specified object to the System.Windows.Forms.DataObject using the specified format and indicating whether the data can be converted to another format.

Syntax

public virtual void SetData (string format, bool autoConvert, object data)

Parameters

format
The format associated with the data. See System.Windows.Forms.DataFormats for predefined formats.
autoConvert
true to allow the data to be converted to another format; otherwise, false.
data
The data to store.

Remarks

If you do not know the format of the target application, you can store data in multiple formats using this method.

Requirements

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