System.Windows.Forms.DataObject.SetData Method

Adds the specified object to the System.Windows.Forms.DataObject using the specified format.

Syntax

public virtual void SetData (string format, object data)

Parameters

format
The format associated with the data. See System.Windows.Forms.DataFormats for predefined formats.
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.

Data stored using this method can be converted to a compatible format when it is retrieved.

Requirements

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