A DataObject can be created in three different overloads of the DataObject constructor.
[C#]
string mystring = 'Drag and Drop String Object';
DataObject dataobject = new DataObject(mystring);
[C#]
string mystring = 'Drag and Drop String Object';
DataObject dataobject = new DataObject(DataFormats.UnicodeText,mystring);
[C#]
string mystring = 'Drag and Drop String Object';
DataObject dataobject = new DataObject(DataFormats.UnicodeText,mystring,false);
Share with