Overview | Methods | This Package | All Packages
Creates a DataObject object.
Syntax
public DataObject()
public DataObject( IDataObject data )
public DataObject( IOleDataObject data )
public DataObject( Object data )
public DataObject( String format, Object data )
Parameters
data
An object that represents the object that will be wrapped either as an IOleDataObject or IDataObject or referenced in the Data object.
format
A String object that represents the format to store the data as.
Remarks
The DataObject provides several constructors for creating a DataObject object. The first version creates a DataObject object that can be used to store arbitrary data. The second and third versions create a DataObject object that wraps an interface object passed as a parameter to the constructor. The fourth version attempts to bind the object passed to the constructor as either an IOleDataObject object or an IDataObject object. Or it stores a reference to the object in the DataObject object. The fifth version provides a way to store the data specified in the data parameter in the format specified in the format parameter.