DataFormats::Dif Field
Specifies the Windows Data Interchange Format (DIF), which Windows Forms does not directly use. This static field is read-only.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
DIF is a format consisting of ASCII codes in which database, spreadsheet, and similar documents can be structured to facilitate their use by and transfer to other programs.
This field is used by the IDataObject interface and the DataObject class to specify the data type.
When adding to an IDataObject or to an implementation of DataObject, use this field as the format for the IDataObject::SetData and DataObject::SetData methods.
To see if an object of this type exists, use this field as the format for the IDataObject::GetDataPresent and DataObject::GetDataPresent methods.
To get an object of this type, use this as the format for the IDataObject::GetData and DataObject::GetData methods.
The following code example demonstrates the use of this member.
FileStream^ myFileStream = File::Open( "Temp.dif", FileMode::Open ); // Store the data into Dif format. DataObject^ myDataObject = gcnew DataObject; myDataObject->SetData( DataFormats::Dif, myFileStream ); // Check whether the data is stored or not in the specified format. bool formatPresent = myDataObject->GetDataPresent( DataFormats::Dif ); if ( formatPresent ) { Console::WriteLine( "The data has been stored in the Dif format is:'{0}'", formatPresent ); } else { Console::WriteLine( "The data has not been stored in the specified format" ); }
Available since 1.1