System.Windows.Forms.DataObject.GetFormats Method

Returns a list of all formats that data stored in this System.Windows.Forms.DataObject is associated with or can be converted to, using an automatic conversion parameter to determine whether to retrieve only native data formats or all formats that the data can be converted to.

Syntax

public virtual string[] GetFormats (bool autoConvert)

Parameters

autoConvert
true to retrieve all formats that data stored in this System.Windows.Forms.DataObject is associated with, or can be converted to; false to retrieve only native data formats.

Returns

An array of type string, containing 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 DataObject.GetData(string, bool). See System.Windows.Forms.DataFormats 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.

Requirements

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