Clipboard.GetText Method ()

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Returns a string containing the UnicodeText data on the Clipboard.

Namespace:   System.Windows
Assembly:  PresentationCore (in PresentationCore.dll)

public static string GetText()

Return Value

Type: System.String

A string containing the UnicodeText data , or an empty string if no UnicodeText data is available on the Clipboard.

The UnicodeText data format denotes 16-bit character encoded Unicode, also referred to as UTF-16, and UCS-2.

.NET Framework
Available since 3.0
Silverlight
Available since 4.0
Windows Phone Silverlight
Available since 7.1
Return to top
Show: