DataObject.ContainsText Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Indicates whether the data object contains text data.
Overloads
ContainsText() |
Indicates whether the data object contains data in the UnicodeText format. |
ContainsText(TextDataFormat) |
Indicates whether the data object contains text data in the format indicated by the specified TextDataFormat value. |
ContainsText()
Indicates whether the data object contains data in the UnicodeText format.
public:
virtual bool ContainsText();
public virtual bool ContainsText ();
abstract member ContainsText : unit -> bool
override this.ContainsText : unit -> bool
Public Overridable Function ContainsText () As Boolean
Returns
true
if the data object contains text data; otherwise, false
.
Remarks
Use this method to determine whether the data object contains text data before retrieving it with the GetText method.
See also
Applies to
ContainsText(TextDataFormat)
Indicates whether the data object contains text data in the format indicated by the specified TextDataFormat value.
public:
virtual bool ContainsText(System::Windows::Forms::TextDataFormat format);
public virtual bool ContainsText (System.Windows.Forms.TextDataFormat format);
abstract member ContainsText : System.Windows.Forms.TextDataFormat -> bool
override this.ContainsText : System.Windows.Forms.TextDataFormat -> bool
Public Overridable Function ContainsText (format As TextDataFormat) As Boolean
Parameters
- format
- TextDataFormat
One of the TextDataFormat values.
Returns
true
if the data object contains text data in the specified format; otherwise, false
.
Exceptions
format
is not a valid TextDataFormat value.
Remarks
Use this method to determine whether the data object contains text data before retrieving it with the GetText method.
See also
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應