System.Windows.Forms.Clipboard.GetFileDropList Method

Retrieves a collection of file names from the Clipboard.

Syntax

public static System.Collections.Specialized.StringCollection GetFileDropList ()

Returns

A System.Collections.Specialized.StringCollection containing file names or null if the Clipboard does not contain any data that is in the DataFormats.FileDrop format or can be converted to that format.

Remarks

A file drop list is a collection of strings containing path information for files.

A file drop list is stored on the Clipboard as a string array. This method converts this array to a System.Collections.Specialized.StringCollection and returns the collection.

Use the Clipboard.ContainsFileDropList method to determine whether the Clipboard contains a file drop list before retrieving it with this method.

Use the Clipboard.SetFileDropList(System.Collections.Specialized.StringCollection) method to add a file drop list to the Clipboard.

Note:

The System.Windows.Forms.Clipboard class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your Main method is marked with the STAThreadAttribute attribute.

Requirements

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