DataFormats.Dif 필드

정의

Windows Forms에서는 직접 사용되지 않는 Windows DIF(데이터 교환 형식)를 지정합니다. 이 static 필드는 읽기 전용입니다.

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

필드 값

String

예제

다음 코드 예제에서는이 멤버를 사용 하는 방법을 보여 줍니다.

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

설명

DIF은 구성 된 ASCII 코드는 데이터베이스, 스프레드시트 및 유사한 문서 구조를 지정 하 여 쉽게 사용할 다른 프로그램으로 전송 하는 형식입니다.

이 필드가 사용 되는 IDataObject 인터페이스 및 DataObject 데이터 형식을 지정 하는 클래스입니다.

추가 하는 경우는 IDataObject 또는의 구현에 DataObject, 형식으로이 필드를 사용 합니다 IDataObject.SetDataDataObject.SetData 메서드.

이 형식의 개체 있는지를 확인 하려면이 필드에 대 한 형식으로 사용 합니다 IDataObject.GetDataPresentDataObject.GetDataPresent 메서드.

이 형식의 개체를 가져오려는 형식으로 사용 합니다 IDataObject.GetDataDataObject.GetData 메서드.

적용 대상

추가 정보