DataObject.GetText Method

Definition

Retrieves text data from the data object.

Overloads

GetText(TextDataFormat)

Retrieves text data from the data object in the format indicated by the specified TextDataFormat value.

GetText()

Retrieves text data from the data object in the UnicodeText format.

GetText(TextDataFormat)

Retrieves text data from the data object in the format indicated by the specified TextDataFormat value.

public:
 virtual System::String ^ GetText(System::Windows::Forms::TextDataFormat format);
public virtual string GetText (System.Windows.Forms.TextDataFormat format);
abstract member GetText : System.Windows.Forms.TextDataFormat -> string
override this.GetText : System.Windows.Forms.TextDataFormat -> string
Public Overridable Function GetText (format As TextDataFormat) As String

Parameters

format
TextDataFormat

One of the TextDataFormat values.

Returns

The text data in the data object or Empty if the data object does not contain data in the specified format.

Exceptions

format is not a valid TextDataFormat value.

Remarks

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

Use the SetText method to add text data to the data object.

See also

GetText()

Retrieves text data from the data object in the UnicodeText format.

public:
 virtual System::String ^ GetText();
public virtual string GetText ();
abstract member GetText : unit -> string
override this.GetText : unit -> string
Public Overridable Function GetText () As String

Returns

The text data in the data object or Empty if the data object does not contain data in the UnicodeText format.

Remarks

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

Use the SetText method to add text data to the data object.

See also

Applies to