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.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.