DataObject.GetText Method
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.
Retrieves text data from the data object.
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. |
- Source:
- DataObject.cs
- Source:
- DataObject.cs
- Source:
- DataObject.cs
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
Applies to
.NET Framework 4.8.1 og andre versioner
Produkt | Versions |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
- Source:
- DataObject.cs
- Source:
- DataObject.cs
- Source:
- DataObject.cs
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
.NET Framework 4.8.1 og andre versioner
Produkt | Versions |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
.NET feedback
.NET er et åben kildekode projekt. Vælg et link for at give feedback: