IDataObject.SetData IDataObject.SetData IDataObject.SetData IDataObject.SetData Method

Definition

Stores the specified data in this data object.

Overloads

SetData(Object) SetData(Object) SetData(Object) SetData(Object)

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

SetData(String, Object) SetData(String, Object) SetData(String, Object) SetData(String, Object)

Stores the specified data in this data object, along with one or more specified data formats. The data format is specified by a string.

SetData(Type, Object) SetData(Type, Object) SetData(Type, Object) SetData(Type, Object)

Stores the specified data in this data object, along with one or more specified data formats. The data format is specified by a Type class.

SetData(String, Object, Boolean) SetData(String, Object, Boolean) SetData(String, Object, Boolean) SetData(String, Object, Boolean)

Stores the specified data in this data object, along with one or more specified data formats. This overload includes a Boolean flag to indicate whether the data may be converted to another format on retrieval.

SetData(Object) SetData(Object) SetData(Object) SetData(Object)

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

public:
 void SetData(System::Object ^ data);
[System.Security.SecurityCritical]
public void SetData (object data);
abstract member SetData : obj -> unit
Public Sub SetData (data As Object)

Parameters

data
Object Object Object Object

The data to store in this data object.

Remarks

For an implementation of this method, see SetData.

SetData(String, Object) SetData(String, Object) SetData(String, Object) SetData(String, Object)

Stores the specified data in this data object, along with one or more specified data formats. The data format is specified by a string.

public:
 void SetData(System::String ^ format, System::Object ^ data);
[System.Security.SecurityCritical]
public void SetData (string format, object data);
abstract member SetData : string * obj -> unit
Public Sub SetData (format As String, data As Object)

Parameters

format
String String String String

A string that specifies what format to store the data in. See the DataFormats class for a set of pre-defined data formats.

data
Object Object Object Object

The data to store in this data object.

Remarks

For an implementation of this method, see SetData.

SetData(Type, Object) SetData(Type, Object) SetData(Type, Object) SetData(Type, Object)

Stores the specified data in this data object, along with one or more specified data formats. The data format is specified by a Type class.

public:
 void SetData(Type ^ format, System::Object ^ data);
[System.Security.SecurityCritical]
public void SetData (Type format, object data);
abstract member SetData : Type * obj -> unit
Public Sub SetData (format As Type, data As Object)

Parameters

format
Type Type Type Type

A Type that specifies what format to store the data in. See the DataFormats class for a set of predefined data formats.

data
Object Object Object Object

The data to store in this data object.

Remarks

For an implementation of this method, see SetData.

SetData(String, Object, Boolean) SetData(String, Object, Boolean) SetData(String, Object, Boolean) SetData(String, Object, Boolean)

Stores the specified data in this data object, along with one or more specified data formats. This overload includes a Boolean flag to indicate whether the data may be converted to another format on retrieval.

public:
 void SetData(System::String ^ format, System::Object ^ data, bool autoConvert);
[System.Security.SecurityCritical]
public void SetData (string format, object data, bool autoConvert);
abstract member SetData : string * obj * bool -> unit
Public Sub SetData (format As String, data As Object, autoConvert As Boolean)

Parameters

format
String String String String

A string that specifies what format to store the data in. See the DataFormats class for a set of pre-defined data formats.

data
Object Object Object Object

The data to store in this data object.

autoConvert
Boolean Boolean Boolean Boolean

true to allow the data to be converted to another format on retrieval; false to prohibit the data from being converted to another format on retrieval.

Remarks

For an implementation of this method, see SetData.

Applies to