DataObject.ContainsText Method (TextDataFormat)

 

Indicates whether the data object contains text data in the format indicated by the specified TextDataFormat value.

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

public virtual bool ContainsText(
	TextDataFormat format
)

Parameters

format
Type: System.Windows.Forms.TextDataFormat

One of the TextDataFormat values.

Return Value

Type: System.Boolean

true if the data object contains text data in the specified format; otherwise, false.

Exception Condition
InvalidEnumArgumentException

format is not a valid TextDataFormat value.

Use this method to determine whether the data object contains text data before retrieving it with the GetText method.

.NET Framework
Available since 2.0
Return to top
Show: