System.Windows.Forms.IDataObject.GetFormats Method

Gets a list of all formats that data stored in this instance is associated with or can be converted to, using a Boolean value to determine whether to retrieve all formats that the data can be converted to or only native data formats.

Syntax

public string[] GetFormats (bool autoConvert)

Parameters

autoConvert
true to retrieve all formats that data stored in this instance is associated with or can be converted to; false to retrieve only native data formats.

Returns

An array of the names that represents a list of all formats that are supported by the data stored in this object.

Remarks

Call this method to get the supported data formats before calling the IDataObject.GetData(string, bool) method. See the System.Windows.Forms.DataFormats class for the predefined formats.

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.GetFormats(bool).

Requirements

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