DataObject.GetText 方法

定義

傳回字串,這個字串包含這個資料物件中的文字資料。

多載

GetText(TextDataFormat)

傳回字串,這個字串包含這個資料物件中使用所指定格式的文字資料。

GetText()

傳回字串,這個字串包含這個資料物件中的 UnicodeText 資料。

GetText(TextDataFormat)

傳回字串,這個字串包含這個資料物件中使用所指定格式的文字資料。

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

參數

format
TextDataFormat

TextDataFormat 的成員,指定要擷取的特定文字資料格式。

傳回

字串,其中包含指定之資料格式的文字資料,如果沒有可用的對應文字資料,則傳回空字串。

例外狀況

format 沒有指定有效的 TextDataFormat 成員。

另請參閱

適用於

GetText()

傳回字串,這個字串包含這個資料物件中的 UnicodeText 資料。

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

傳回

包含 UnicodeText 資料的字串,如果沒有可用的 UnicodeText 資料,則會傳回空字串。

備註

資料 UnicodeText 格式代表 16 位字元編碼的 Unicode,也稱為 UTF-16 和 USC-2。

另請參閱

適用於