Ανάγνωση στα Αγγλικά Επεξεργασία

Κοινή χρήση μέσω


Clipboard.SetText Method

Definition

Stores text data on the Clipboard. The text data to store is specified as a string.

Overloads

SetText(String)

Stores UnicodeText data on the Clipboard.

SetText(String, TextDataFormat)

Stores text data on the Clipboard in a specified text data format. The UnicodeText data to store is specified as a string.

SetText(String)

Stores UnicodeText data on the Clipboard.

C#
public static void SetText(string text);

Parameters

text
String

A string that contains the UnicodeText data to store on the Clipboard.

Exceptions

text is null.

Remarks

This data format denotes 16-bit character encoded Unicode, also referred to as UTF-16, and UCS-2.

This method adds data with auto-conversion disabled.

See also

Applies to

.NET Framework 4.8.1 και άλλες εκδόσεις
Προϊόν Εκδόσεις
.NET Framework 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, 10

SetText(String, TextDataFormat)

Stores text data on the Clipboard in a specified text data format. The UnicodeText data to store is specified as a string.

C#
public static void SetText(string text, System.Windows.TextDataFormat format);

Parameters

text
String

A string that contains the text data to store on the Clipboard.

format
TextDataFormat

A member of TextDataFormat that specifies the specific text data format to store.

Exceptions

text is null.

Remarks

This method adds data with auto-conversion disabled.

See also

Applies to

.NET Framework 4.8.1 και άλλες εκδόσεις
Προϊόν Εκδόσεις
.NET Framework 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, 10