DataFormats.Dif Bidang
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Menentukan Format Pertukaran Data (DIF) Windows, yang tidak digunakan secara langsung oleh Formulir Windows. Bidang ini static bersifat baca-saja.
public: static initonly System::String ^ Dif;
public static readonly string Dif;
staticval mutable Dif : string
Public Shared ReadOnly Dif As String
Nilai Bidang
Contoh
Contoh kode berikut menunjukkan penggunaan anggota ini.
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" );
}
FileStream myFileStream = File.Open("Temp.dif",FileMode.Open);
// Store the data into Dif format.
DataObject myDataObject = new 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:'"+formatPresent+"'");
}
else
{
Console.WriteLine("The data has not been stored in the specified format");
}
Dim myFileStream As FileStream = File.Open("Temp.dif", FileMode.Open)
' Store the data into Dif format.
Dim myDataObject As New DataObject()
myDataObject.SetData(DataFormats.Dif, myFileStream)
' Check whether the data is stored or not in the specified format.
Dim formatPresent As Boolean = myDataObject.GetDataPresent(DataFormats.Dif)
If formatPresent Then
Console.WriteLine(("The data has been stored in the Dif format is:'" + formatPresent.ToString() + "'"))
Else
Console.WriteLine("The data has not been stored in the specified format")
End If
Keterangan
DIF adalah format yang terdiri dari kode ASCII tempat database, spreadsheet, dan dokumen serupa dapat disusun untuk memfasilitasi penggunaannya dengan dan mentransfer ke program lain.
Bidang ini digunakan oleh IDataObject antarmuka dan DataObject kelas untuk menentukan jenis data.
Saat menambahkan ke IDataObject atau ke implementasi DataObject, gunakan bidang ini sebagai format untuk IDataObject.SetData metode dan DataObject.SetData .
Untuk melihat apakah objek jenis ini ada, gunakan bidang ini sebagai format untuk IDataObject.GetDataPresent metode dan DataObject.GetDataPresent .
Untuk mendapatkan objek jenis ini, gunakan ini sebagai format untuk IDataObject.GetData metode dan DataObject.GetData .