DataObject.GetFormats Method (Boolean)
Returns a list of all formats that data stored in this 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.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
abstract GetFormats : autoConvert:bool -> string override GetFormats : autoConvert:bool -> string
Return ValueType: System.String
An array of type String, containing a list of all formats that are supported by the data stored in this object.
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.
The following code example queries a DataObject for the formats associated with its data. The first query specifies the autoConvert parameter as false, so only the native format of the data is returned. The second query specifies the autoConvert parameter as true, so the list of formats includes the formats that the data can be converted to.
This code requires that textBox1 has been created.
Available since 1.1