DataObject.SetData Method (Object)

 

Stores the specified data in this data object, automatically determining the data format from the source object type.

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

[SecurityCriticalAttribute]
public void SetData(
	object data
)

Parameters

data
Type: System.Object

An object that represents the data to store in this data object.

Exception Condition
ArgumentNullException

data is null.

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

UIPermission

for permission to transfer data to the system Clipboard. Associated enumeration: AllClipboard.

.NET Framework
Available since 3.0
Silverlight
Available since 4.0
Return to top
Show: