DataObject.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 that contains text data of the specified format in this data object.

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

public string GetText(
	TextDataFormat format


Type: System.Windows.TextDataFormat

A member of TextDataFormat that specifies the specific 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.

Exception Condition

format does not specify a valid member of TextDataFormat.

.NET Framework
Available since 3.0
Return to top