System.Windows.Forms.IDataObject.GetDataPresent Method

Determines whether data stored in this instance is associated with, or can be converted to, the specified format.

Syntax

public bool GetDataPresent (string format)

Parameters

format
The format for which to check. See System.Windows.Forms.DataFormats for predefined formats.

Returns

true if data stored in this instance is associated with, or can be converted to, the specified format; otherwise false.

Remarks

Call this method to determine whether a format exists in this System.Windows.Forms.DataObject before calling IDataObject.GetData(string, bool). Call IDataObject.GetFormats(bool) for the formats that are available in this instance.

Note:

Data can be converted to another format if it was stored specifying that conversion is allowed, and if the requested format is compatible with the stored format. For example, data stored as Unicode can be converted to text.

For an implementation of this method, see DataObject.GetDataPresent(Type).

Requirements

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