Share via


DataFormats.Dif Alan

Tanım

Windows Forms doğrudan kullanmadığı Windows Veri Değişim Biçimini (DIF) belirtir. Bu static alan salt okunur.

public: static initonly System::String ^ Dif;
public static readonly string Dif;
 staticval mutable Dif : string
Public Shared ReadOnly Dif As String 

Alan Değeri

Örnekler

Aşağıdaki kod örneğinde bu üyenin kullanımı gösterilmektedir.

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

Açıklamalar

DIF, veritabanı, elektronik tablo ve benzer belgelerin tarafından kullanımını kolaylaştırmak ve diğer programlara aktarmak için yapılandırılabildiği ASCII kodlarından oluşan bir biçimdir.

Bu alan, arabirim ve DataObject sınıf tarafından IDataObject veri türünü belirtmek için kullanılır.

uygulamasına IDataObjectDataObjectveya eklerken ve DataObject.SetData yöntemleri için IDataObject.SetData biçim olarak bu alanı kullanın.

Bu tür bir nesnenin var olup olmadığını görmek için IDataObject.GetDataPresent ve DataObject.GetDataPresent yöntemlerinin biçimi olarak bu alanı kullanın.

Bu türdeki bir nesneyi almak için IDataObject.GetData ve DataObject.GetData yöntemlerinin biçimi olarak bunu kullanın.

Şunlara uygulanır

Ayrıca bkz.