DataObject.ContainsText 方法

定义

查询某数据对象中是否存在有效文本数据格式的数据。Queries a data object for the presence of data in a valid text data format.

重载

ContainsText()

查询某数据对象中是否存在 UnicodeText 格式的数据。Queries a data object for the presence of data in the UnicodeText format.

ContainsText(TextDataFormat)

查询某数据对象中是否存在文本数据格式的数据。Queries a data object for the presence of data in a text data format.

ContainsText()

查询某数据对象中是否存在 UnicodeText 格式的数据。Queries a data object for the presence of data in the UnicodeText format.

public:
 bool ContainsText();
public bool ContainsText ();
member this.ContainsText : unit -> bool
Public Function ContainsText () As Boolean

返回

Boolean

如果此数据对象包含 UnicodeText 数据格式的数据,则为 true;否则为 falsetrue if the data object contains data in the UnicodeText data format; otherwise, false.

注解

true仅当数据对象中本机存在指定的数据格式时,此方法才会返回; 此方法不会检查是否存在自动转换的数据格式。This method returns true only if the specified data format exists natively in the data object; this method does not check for the presence of auto-convertible data formats.

UnicodeText数据格式表示16位字符编码的 Unicode,也称为 utf-16,USC 为2。The UnicodeText data format denotes 16-bit character encoded Unicode, also referred to as UTF-16, and USC-2.

另请参阅

适用于

ContainsText(TextDataFormat)

查询某数据对象中是否存在文本数据格式的数据。Queries a data object for the presence of data in a text data format.

public:
 bool ContainsText(System::Windows::TextDataFormat format);
public bool ContainsText (System.Windows.TextDataFormat format);
member this.ContainsText : System.Windows.TextDataFormat -> bool
Public Function ContainsText (format As TextDataFormat) As Boolean

参数

format
TextDataFormat

TextDataFormat 枚举成员,用于指定要查询的文本数据格式。A member of the TextDataFormat enumeration that specifies the text data format to query for.

返回

Boolean

如果此数据对象包含文本数据格式的数据,则为 true;否则为 falsetrue if the data object contains data in a text data format; otherwise, false.

例外

format 不指定 TextDataFormat 的有效成员。format does not specify a valid member of TextDataFormat.

注解

true仅当数据对象中本机存在指定的数据格式时,此方法才会返回; 此方法不会检查是否存在自动转换的数据格式。This method returns true only if the specified data format exists natively in the data object; this method does not check for the presence of auto-convertible data formats.

另请参阅

适用于