DataObject.SetText Method (String)

Stores UnicodeText data, specified as a string, in this data object.

Namespace:  System.Windows
Assembly:  PresentationCore (in PresentationCore.dll)

public void SetText(
	string textData
)

Parameters

textData
Type: System.String

A string that contains the UnicodeText data to store in the data object.

ExceptionCondition
ArgumentNullException

textData is null.

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

This method adds data with auto-conversion disabled (the same as calling SetData(String, Object, Boolean) with autoConvert set to false).

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft