Removes all data from the Clipboard.
public static void Clear()
Exception Condition ExternalException
The Clipboard could not be cleared. This typically occurs when the Clipboard is being used by another process.
The current thread is not in single-threaded apartment (STA) mode. Add the
to your application's STAThreadAttribute method. Main
Because the Clipboard is shared by multiple processes, calling this method may have an impact on those processes.
class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your Clipboard method is marked with the Main attribute. STAThreadAttribute
The following example demonstrates this member.
Supported in: 4, 3.5, 3.0, 2.0
.NET Framework Client Profile
Supported in: 4, 3.5 SP1
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see
.NET Framework System Requirements.