Clipboard.GetText Method (TextDataFormat)


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

Returns a string containing text data on the Clipboard.

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

public static string GetText(
	TextDataFormat format


Type: System.Windows.TextDataFormat

A member of TextDataFormat that specifies the text data format to retrieve.

Return Value

Type: System.String

A string containing text data in the specified data format, or an empty string if no corresponding text data is available.

.NET Framework
Available since 3.0
Return to top