System.Windows.Forms.DataObject: Method Members

The methods of System.Windows.Forms.DataObject are listed below. For a list of all members, see the DataObject Members list.

See Also: Inherited members from System.Object

Public Methods

ContainsAudio() : bool

Indicates whether the data object contains data in the DataFormats.WaveAudio format.

ContainsFileDropList() : bool

Indicates whether the data object contains data that is in the DataFormats.FileDrop format or can be converted to that format.

ContainsImage() : bool

Indicates whether the data object contains data that is in the DataFormats.Bitmap format or can be converted to that format.

ContainsText() : bool

Indicates whether the data object contains data in the TextDataFormat.UnicodeText format.

ContainsText(TextDataFormat) : bool

Indicates whether the data object contains text data in the format indicated by the specified System.Windows.Forms.TextDataFormat value.

GetAudioStream() : System.IO.Stream

Retrieves an audio stream from the data object.

GetData(string) : object

Returns the data associated with the specified data format.

GetData(Type) : object

Returns the data associated with the specified class type format.

GetData(string, bool) : object

Returns the data associated with the specified data format, using an automated conversion parameter to determine whether to convert the data to the format.

GetDataPresent(string) : bool

Determines whether data stored in this System.Windows.Forms.DataObject is associated with, or can be converted to, the specified format.

GetDataPresent(Type) : bool

Determines whether data stored in this System.Windows.Forms.DataObject is associated with, or can be converted to, the specified format.

GetDataPresent(string, bool) : bool

Determines whether this System.Windows.Forms.DataObject contains data in the specified format or, optionally, contains data that can be converted to the specified format.

GetFileDropList() : System.Collections.Specialized.StringCollection

Retrieves a collection of file names from the data object.

GetFormats() : string[]

Returns a list of all formats that data stored in this System.Windows.Forms.DataObject is associated with or can be converted to.

GetFormats(bool) : string[]

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.

GetImage() : System.Drawing.Image

Retrieves an image from the data object.

GetText() : string

Retrieves text data from the data object in the TextDataFormat.UnicodeText format.

GetText(TextDataFormat) : string

Retrieves text data from the data object in the format indicated by the specified System.Windows.Forms.TextDataFormat value.

SetAudio(byte[])

Adds a byte array to the data object in the DataFormats.WaveAudio format after converting it to a System.IO.Stream.

SetAudio(System.IO.Stream)

Adds a System.IO.Stream to the data object in the DataFormats.WaveAudio format.

SetData(object)

Adds the specified object to the System.Windows.Forms.DataObject using the object type as the data format.

SetData(string, object)

Adds the specified object to the System.Windows.Forms.DataObject using the specified format.

SetData(Type, object)

Adds the specified object to the System.Windows.Forms.DataObject using the specified type as the format.

SetData(string, bool, object)

Adds the specified object to the System.Windows.Forms.DataObject using the specified format and indicating whether the data can be converted to another format.

SetFileDropList(System.Collections.Specialized.StringCollection)

Adds a collection of file names to the data object in the DataFormats.FileDrop format.

SetImage(System.Drawing.Image)

Adds an System.Drawing.Image to the data object in the DataFormats.Bitmap format.

SetText(string)

Adds text data to the data object in the TextDataFormat.UnicodeText format.

SetText(string, TextDataFormat)

Adds text data to the data object in the format indicated by the specified System.Windows.Forms.TextDataFormat value.